Closed d-fischer closed 4 years ago
Hey @d-fischer! Thanks for your PR! It's really interesting to see how a ESM package would look like.
However, since ESM in Node is still in the experimental stage I feel it wouldn't be a good idea to make it available to the general public as the API may change in the future. If some app begins relying on it, it might break on future cross-fetch versions (possibly many times).
Can this get another review since nodejs/node@73ea6701524974ce388e87b5f3cc2f9aa181933f will land in node 15.3.0?
Currently, using this package with native ESM loading fails with an error like this:
This pull request fixes that by adding a separate ESM version of the ponyfill and referencing it in the
exports
key of package.json. The polyfill doesn't need a special version (since it doesn't export anything) but still needs to be referenced in theexports
.