Module parse failed: The top-level-await experiment is not enabled (set experiments.topLevelAwait: true to enabled it)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See <https://webpack.js.org/concepts#loaders>
Error: The top-level-await experiment is not enabled (set experiments.topLevelAwait: true to enabled it)
When I am compiling a multiplatform library with wasm targets
I have added this to my
webpack.config.d
Copy code
var experiments = config.experiments || {}
experiments.topLevelAwait = true
But still the problem persists
andylamax
04/15/2023, 8:17 PM
Looks like this piece of configuration was missing