mirror of
https://github.com/status-im/js-waku-examples.git
synced 2025-01-12 06:54:27 +00:00
24 lines
631 B
JavaScript
24 lines
631 B
JavaScript
// 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;
|
|
},
|
|
},
|
|
};
|