standard-things / esm

Tomorrow's ECMAScript modules today!
Other
5.26k stars 147 forks source link

`exports` field in package.json is ignored #924

Open JonnyBurger opened 1 year ago

JonnyBurger commented 1 year ago

I received a bug report from one of our users and we were able to find the following behavior:

npm i remotion@3.3.31 esm

The following works:

node -e "console.log(require('remotion/version'))"

but this does not:

node -r esm-wallaby -e "console.log(require('remotion/version'))"

Adding an exports field to package.json is supported by Node.JS since a while, so this module should not break the module resolution.