-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
40 lines (38 loc) · 1.07 KB
/
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
33
34
35
36
37
38
39
40
// @ts-check
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
reactStrictMode: true,
typescript: {
ignoreBuildErrors: process.env.NEXT_PUBLIC_IGNORE_BUILD_ERROR === "true",
},
eslint: {
ignoreDuringBuilds: process.env.NEXT_PUBLIC_IGNORE_BUILD_ERROR === "true",
},
images: { unoptimized: true },
webpack: config => {
config.resolve.fallback = { fs: false, net: false, tls: false };
config.externals.push("pino-pretty", "lokijs", "encoding");
return config;
},
async headers() {
if ('CSP_FRAMES' in process.env) {
return [
{
source: '/:path*',
headers: [
{
key: "Content-Security-Policy",
value: `frame-ancestors ${process.env.CSP_FRAMES}`
}
]
}
]
} else {
return [];
}
},
// the following doesn't seem to work, see instead package.json "build" script containing "tsc --build" and tsconfig.json "refereences" setting
transpilePackages: ['@10tance/map']
};
module.exports = nextConfig;