Skip to content

Commit 562640d

Browse files
authored
(examples/with-webassembly) fixed for webpack 5 (#26440)
## Documentation / Examples - [x] Make sure the linting passes Fixes #26436 As mention in #25854 `with-webassembly` example doesn't work anymore after switching to webpack 5. This PR adds webpack experimental configuration.
1 parent 4d13d67 commit 562640d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
module.exports = {
22
webpack(config) {
33
config.output.webassemblyModuleFilename = 'static/wasm/[modulehash].wasm'
4+
5+
// Since Webpack 5 doesn't enable WebAssembly by default, we should do it manually
6+
config.experiments = { asyncWebAssembly: true }
7+
48
return config
59
},
610
}

0 commit comments

Comments
 (0)