// Thanks https://github.com/Emurgo/cardano-serialization-lib/issues/415 module.exports = { webpack: { configure: (webpackConfig) => { const wasmExtensionRegExp = /\.wasm$/; webpackConfig.resolve.extensions.push(".wasm"); webpackConfig.experiments = { asyncWebAssembly: false, syncWebAssembly: true, }; webpackConfig.module.rules.forEach((rule) => { (rule.oneOf || []).forEach((oneOf) => { if (oneOf.type === "asset/resource") { oneOf.exclude.push(wasmExtensionRegExp); } }); }); return webpackConfig; }, }, };