Webpack Configuration
You'll need to configure webpack to support top-level await and WebAssembly. Assuming you are using webpack 5, you can do this by adding the following configuration.
webpack.config.js
module.exports = {
experiments: {
topLevelAwait: true,
asyncWebAssembly: true,
layers: true, // optional, required with some bundlers/frameworks
},
}