You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This allows for native ESM resolution in Node.js (12.x and >=14) in supporting environments w/o sacrificing CommonJS (default) support. Also allows bundler(s) to pick up the ESM entry, too.
There's one gotcha – Node 13.0 thru 13.7 don't support this version of exports.
This can be patched – but only if you decide to keep the default exports (module.exports / export default) that you currently have. This means that the the addition remains non-breaking, even w/ these Node versions.
I can PR these changes if desired.
The text was updated successfully, but these errors were encountered:
It'd be nice to offer a supplemental ESM build that's linked via:
"module"
inpackage.json
import
key inside eachexports
entry (insidepackage.json
too)This'd end up looking something like:
This allows for native ESM resolution in Node.js (12.x and >=14) in supporting environments w/o sacrificing CommonJS (default) support. Also allows bundler(s) to pick up the ESM entry, too.
There's one gotcha – Node 13.0 thru 13.7 don't support this version of
exports
.This can be patched – but only if you decide to keep the default exports (
module.exports
/export default
) that you currently have. This means that the the addition remains non-breaking, even w/ these Node versions.I can PR these changes if desired.
The text was updated successfully, but these errors were encountered: