Skip to content

Commit

Permalink
(examples/with-webassembly) fixed for webpack 5 (#26440)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
vitalybaev authored Jun 21, 2021
1 parent 4d13d67 commit 562640d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/with-webassembly/next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
module.exports = {
webpack(config) {
config.output.webassemblyModuleFilename = 'static/wasm/[modulehash].wasm'

// Since Webpack 5 doesn't enable WebAssembly by default, we should do it manually
config.experiments = { asyncWebAssembly: true }

return config
},
}

0 comments on commit 562640d

Please sign in to comment.