Skip to content

add package.json exports field#80

Open
dynst wants to merge 2 commits into
omichelsen:mainfrom
dynst:exports
Open

add package.json exports field#80
dynst wants to merge 2 commits into
omichelsen:mainfrom
dynst:exports

Conversation

@dynst

@dynst dynst commented Aug 7, 2025

Copy link
Copy Markdown

The ESM code is unuseable by Node.js in the non-standard "module" field where only a bundler will see it.

https://nodejs.org/api/packages.html#conditional-exports

And Node.js has 2 separate parsers, so it needs CJS and ESM files to have distinct file extensions like .cjs to pick the correct one when loading a file.

dynst added 2 commits August 7, 2025 20:00
The ESM code is unuseable in the non-standard 'module' field.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant