You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 the type will alleviate the risk a little bit. Might be worth a breaking change.
Who
n/a
References
n/a
The text was updated successfully, but these errors were encountered:
At the very least, it would be nice somewhere within the npm CLI for pack and publish commands to emit a warning or throw an error if the package exports field contains files that aren't published.
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: