Skip to content

Commit

Permalink
(examples/with-webassembly) fixed for webpack 5 (vercel#26440)
Browse files Browse the repository at this point in the history
## Documentation / Examples

- [x] Make sure the linting passes

Fixes vercel#26436

As mention in vercel#25854 `with-webassembly` example doesn't work anymore after switching to webpack 5.
This PR adds webpack experimental configuration.
  • Loading branch information
vitalybaev committed 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
@@ -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.