rsnext/examples/with-webassembly/next.config.js
Vitaly Baev 562640dbb4
(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.
2021-06-21 16:45:16 +00:00

10 lines
283 B
JavaScript

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
},
}