FredKSchott / FredKSchott/rollup-plugin-polyfill-node

Missing `__esModule` marker

Open
#23 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
193
Forks
60
PR merge metrics
No merged PRs in 30d

Description

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:

```javascript
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
```javascript
{
default: {
default: assertFn,
}
}
```
the top-level default get inserted by `__importDefault`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.