From 562640dbb43195ebdfb2c1c79cac683a5d462c6f Mon Sep 17 00:00:00 2001 From: Vitaly Baev Date: Mon, 21 Jun 2021 19:45:16 +0300 Subject: [PATCH] (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. --- examples/with-webassembly/next.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/with-webassembly/next.config.js b/examples/with-webassembly/next.config.js index 97e1bdca0ee6..24f0df7cd047 100644 --- a/examples/with-webassembly/next.config.js +++ b/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 }, }