-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
40 lines (34 loc) · 1 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
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
images: {
loader: 'imgix',
path: 'https://zkwallet.welldonestudio.io',
},
// eslint-disable-next-line @typescript-eslint/no-unused-vars
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
config.module.rules.push({
test: /\.wasm$/,
loader: 'base64-loader',
type: 'javascript/auto',
});
config.module.noParse = /\.wasm$/;
config.module.rules.forEach((rule) => {
(rule.oneOf || []).forEach((oneOf) => {
if (oneOf.loader && oneOf.loader.indexOf('file-loader') >= 0) {
oneOf.exclude.push(/\.wasm$/);
}
});
});
if (!isServer) {
config.resolve.fallback.fs = false;
}
// Perform customizations to webpack config
config.plugins.push(
new webpack.IgnorePlugin({ resourceRegExp: /\/__tests__\// }),
);
// Important: return the modified config
return config;
},
};
module.exports = nextConfig;