-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] auto add files from exports map #58
Comments
At the very least, it would be nice somewhere within the npm CLI for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What / Why
Node.js added a new
exports
property topackage.json
in v12.7.0 to define entry-points.Since these files are definitely needed in the package, I'd like for files in the exports map be automatically added as well.
When
Whenever I define entry assets in the exports map for published packages.
Where
Any npm package
How
Current Behavior
Currently,
npm-packlist
automatically detects important files viapackage.json
propertiesbrowser
,main
, andbin
.Expected Behavior
For files in the
exports
property to be automatically added too.I'm not sure if the exports map is only respected by Node if
"type": "module"
is set, but if it is, it should conditionally only add the exports map given"type": "module"
.This might be a dangerous change in case the
exports
property is used by some packages for something else, but checking thetype
will alleviate the risk a little bit. Might be worth a breaking change.Who
References
The text was updated successfully, but these errors were encountered: