Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

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 authored Jun 21, 2021
1 parent 32f78b9 commit 14280ee
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 14280ee

Please sign in to comment.