40 lines
1.2 KiB
JavaScript
40 lines
1.2 KiB
JavaScript
const path = require("path");
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
reactStrictMode: true,
|
|
async headers() {
|
|
return [{ source: "/(.*)", headers: [
|
|
{ key: "Content-Security-Policy", value: "default-src 'self'; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: https:; font-src 'self' data:; connect-src 'self' https://rpc-http-pub.d-bis.org wss://rpc-ws-pub.d-bis.org https://explorer.d-bis.org; frame-ancestors 'self'; base-uri 'self'; form-action 'self'" },
|
|
] }];
|
|
},
|
|
webpack: (config, { isServer }) => {
|
|
config.resolve.fallback = {
|
|
...config.resolve.fallback,
|
|
fs: false,
|
|
net: false,
|
|
tls: false,
|
|
};
|
|
|
|
config.resolve.alias = {
|
|
...config.resolve.alias,
|
|
"@react-native-async-storage/async-storage": path.join(
|
|
__dirname,
|
|
"lib/stubs/async-storage.js"
|
|
),
|
|
"pino-pretty": false,
|
|
};
|
|
|
|
if (!isServer) {
|
|
config.externals = config.externals || [];
|
|
if (Array.isArray(config.externals)) {
|
|
config.externals.push("pino-pretty", "lokijs", "encoding");
|
|
}
|
|
}
|
|
|
|
return config;
|
|
},
|
|
};
|
|
|
|
module.exports = nextConfig;
|