Skip to content

Conversation

phated
Copy link
Member

@phated phated commented Mar 25, 2024

This implements an ESM wrapper following the Node.js docs for Writing dual packages while avoiding or minimizing hazards

The test seems to work but I'm unsure if there is anything I need to do for the bin file. Perhaps someone else knows.

Closes #2634

@phated phated requested review from yocontra and sttk March 25, 2024 01:17
@perrin4869
Copy link

Since the bin field is never imported by the user, it just needs to follow the format specified by the root package.json file, no special care is needed 😃
Some people think it's good practice to also export the package.json file in the exports field

@phated phated merged commit b00de68 into master Mar 25, 2024
@phated phated deleted the phated/mjs branch March 25, 2024 14:47
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.

Support named exports in mjs files
2 participants