Skip to content

Commit b1c1989

Browse files
committed
fix: wasm warning message, try optimizePackageImports on reaflow
1 parent 6608948 commit b1c1989

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

next.config.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,20 @@ const config = {
1010
output: "export",
1111
reactStrictMode: false,
1212
productionBrowserSourceMaps: true,
13+
experimental: {
14+
optimizePackageImports: ["reaflow"],
15+
},
1316
compiler: {
1417
styledComponents: true,
1518
},
16-
webpack: config => {
19+
webpack: (config, { isServer }) => {
1720
config.resolve.fallback = { fs: false };
1821
config.output.webassemblyModuleFilename = "static/wasm/[modulehash].wasm";
19-
config.experiments = { asyncWebAssembly: true };
22+
config.experiments = { asyncWebAssembly: true, layers: true };
23+
24+
if (!isServer) {
25+
config.output.environment = { ...config.output.environment, asyncFunction: true };
26+
}
2027

2128
return config;
2229
},

0 commit comments

Comments
 (0)