Open
Description
When creating JS libraries, the package.json
documentation on docs.npmjs.com is one of the most helpful resources to me. However it is far from complete, there are many fields that aren't documented there, but they are often needed in order to make a working library. These are for example:
exports
– which module should be used when using module requests likeimport "package/sub/path"
, src: [1], [2]types
andtypesVersions
– type declarations for TS, src: [3]module
– the main entry point for an ESM project, src: [4], [5], [6]type
–whether the main entrypoint iswhether all.js
files are a CommonJS or ES Module, src: [7]
While these options aren't directly used by the NPM CLI, I think it would be great to include them, since they are a de-facto standard shared by many different systems. Should I make a PR that adds them?