chore(examples): fix experiments loading npm wasm (#38348)

* enables default config that handles npm wasm bundles



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
This commit is contained in:
Jeff Mendez 2022-07-06 09:05:14 -04:00 committed by GitHub
parent 56e760a203
commit 616e0d7ee8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@ module.exports = {
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 }
config.experiments = { ...config.experiments, asyncWebAssembly: true }
return config
},