-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
53 lines (49 loc) · 1.12 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
41
42
43
44
45
46
47
48
49
50
51
52
53
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
images: {
unoptimized: true,
},
async headers() {
return [
{
source: '/_next/static/chunks/:path*',
headers: [
{
key: 'Content-Type',
value: 'application/javascript',
},
],
},
]
},
experimental: {
serverActions: {
bodySizeLimit: '10mb',
},
},
webpack: (config, { isServer, dev }) => {
// Fixes npm packages that depend on `fs` module
if (!isServer && !dev) {
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
child_process: false,
net: false,
tls: false,
};
}
// Exclude chrome-aws-lambda from being processed by webpack
config.externals.push({
'chrome-aws-lambda': 'commonjs chrome-aws-lambda',
});
// Ignore .map files for chrome-aws-lambda
config.module.rules.push({
test: /\.map$/,
use: 'ignore-loader',
include: /node_modules\/chrome-aws-lambda/,
});
return config;
},
}
module.exports = nextConfig