Which package?
I encountered it in intl-messageformat, but it's probably present in additional packages
Describe the bug
The ESM version is referred to only with the module field, but that is not part of the Node.js spec and will only work if you first bundle the code. You must include exports for the ESM version to be accessible in an unbundled Node program
https://nodejs.org/api/packages.html#package-entry-points
To Reproduce
Load intl-messageformat from a Node script without a bundler and it will load the CJS version rather than the ESM version
Which package?
I encountered it in
intl-messageformat, but it's probably present in additional packagesDescribe the bug
The ESM version is referred to only with the
modulefield, but that is not part of the Node.js spec and will only work if you first bundle the code. You must includeexportsfor the ESM version to be accessible in an unbundled Node programhttps://nodejs.org/api/packages.html#package-entry-points
To Reproduce
Load
intl-messageformatfrom a Node script without a bundler and it will load the CJS version rather than the ESM version