File tree 1 file changed +8
-11
lines changed
1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -8,19 +8,16 @@ const nextConfig = {
8
8
images : {
9
9
unoptimized : true ,
10
10
} ,
11
- webpack ( config , { isServer, dev } ) {
12
- // Use the client static directory in the server bundle and prod mode
13
- // Fixes `Error occurred prerendering page "/"`
14
- config . output . webassemblyModuleFilename =
15
- isServer && ! dev ? '../public/onigasm.wasm' : 'public/onigasm.wasm'
16
-
17
- // Since Webpack 5 doesn't enable WebAssembly by default, we should do it manually
18
- config . experiments = { ...config . experiments , asyncWebAssembly : true }
19
-
20
- return config
21
- } ,
22
11
experimental : {
23
12
turbo : {
13
+ asyncWebAssembly : true ,
14
+ rules : {
15
+ webassemblyModuleFilename : [
16
+ process . env . NODE_ENV === 'production'
17
+ ? '../public/onigasm.wasm'
18
+ : 'onigasm.wasm' ,
19
+ ] ,
20
+ } ,
24
21
resolveAlias : {
25
22
'monaco-editor' : 'monaco-editor/esm/vs/editor/editor.api' ,
26
23
} ,
You can’t perform that action at this time.
0 commit comments