forked from Proof-Of-Humanity/proof-of-humanity-web
-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
32 lines (31 loc) · 822 Bytes
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
module.exports = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
})({
target: "serverless",
eslint: {
ignoreDuringBuilds: true,
},
headers() {
return [
{
source: "/:path*",
headers: [
{ key: "Cross-Origin-Opener-Policy", value: "same-origin" },
{ key: "Cross-Origin-Embedder-Policy", value: "require-corp" },
],
},
];
},
webpack5: true,
webpack: (config, { isServer }) => {
if (!isServer) {
config.resolve.fallback = {
...config.resolve.fallback, // if you miss it, all the other options in fallback, specified
// by next.js will be dropped. Doesn't make much sense, but how it is
fs: false, // the solution
// path: false,
};
}
return config;
},
});