-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
30 lines (30 loc) · 775 Bytes
/
next.config.js
File metadata and controls
30 lines (30 loc) · 775 Bytes
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
module.exports = {
reactStrictMode: false,
// target: 'serverless',
webpack: (config, { isServer }) => {
// Fixes npm packages that depend on `fs` module
if (!isServer) {
config.resolve.fallback = {
fs: false,
path: "path-browserify",
events: false,
};
}
if (isServer) {
config.externals.push("_http_common");
}
config.module.rules.push({
test: /\.svg$/,
use: ["@svgr/webpack"],
});
config.resolve.alias.stream = "stream-browserify";
config.resolve.alias.zlib = "browserify-zlib";
// config.externals = {
// ...config.externals,
// canvas: "util",
// bufferutil: "bufferutil",
// "utf-8-validate": "utf-8-validate"
// }
return config;
},
};