Visitar URL original
feat: Provide an ESM export by phated · Pull Request #2760 · gulpjs/gulp · GitHub
Skip to content

feat: Provide an ESM export - #2760

Merged
phated merged 3 commits into
masterfrom
phated/mjs
Mar 25, 2024
Merged

phated merged 3 commits into
masterfrom
phated/mjs

Conversation

@phated

@phated phated commented Mar 25, 2024

Copy link
Copy Markdown
Member

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 sttk and yocontra March 25, 2024 01:17
@perrin4869

Copy link
Copy Markdown

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