I have an app that I'm bundling with Webpack 4 and Babel loader.
In the main entry point I'm exporting a class, for example export default Test;
Now I'm trying to import the main bundle in an ESM aware Chrome via
<script type="module">
(async function() {
const test = await import('./module.main.js');
window.test = test;
})()
</script>
The problem is that although the browser is loading the bundle, test
only yields this.
Module {Symbol(Symbol.toStringTag): "Module"}
Symbol(Symbol.toStringTag): "Module"
How can I get hold of my default export? I'm not providing the Webpack config here because it's straight forward.