I'm trying to build an app with snowpack, that uses packages that were compiled with typescript with esModuleInterop on.
It seems like the interop functions injected by typescript think that poyfills are commonjs modules.
So for example if I have:
import assert from 'assert'
assert(true)
```javascript
this gets compiled by typescript to
```javascript
const assert_1 = __importDefault(require("assert"));
assert_1.default(true)
and in the runtime assert_1 is
{
default: {
default: assertFn,
}
}
the top-level default get inserted by __importDefault
I'm trying to build an app with snowpack, that uses packages that were compiled with typescript with
esModuleInterop
on.It seems like the interop functions injected by typescript think that poyfills are commonjs modules.
So for example if I have:
and in the runtime assert_1 is
the top-level default get inserted by
__importDefault