forked from vincent-huang/simple-staking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
50 lines (45 loc) · 1.08 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
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
output: "standalone",
experimental: {
forceSwcTransforms: true,
},
webpack: (config, { isServer }) => {
// Update WASM configuration
config.experiments = {
...config.experiments,
asyncWebAssembly: true,
syncWebAssembly: true,
};
// Update the rule for WASM files
config.module.rules.push({
test: /\.wasm$/,
type: "webassembly/async",
});
if (!isServer) {
config.resolve = {
...config.resolve,
alias: {
...config.resolve.alias,
wbg: false,
},
fallback: {
fs: false,
path: false,
os: false,
net: false,
tls: false,
"source-map-support": false,
module: false,
buffer: require.resolve("buffer"),
process: require.resolve("process/browser"),
wbg: false,
},
};
}
config.externals.push("pino-pretty", "encoding");
return config;
},
};
module.exports = nextConfig;