Skip to content

[FEATURE] Add more fields to the package.json documentation #18

Open
@cshaa

Description

@cshaa

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 like import "package/sub/path", src: [1], [2]
  • types and typesVersions – type declarations for TS, src: [3]
  • module – the main entry point for an ESM project, src: [4], [5], [6]
  • typewhether the main entrypoint is whether 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentIssues or PRs related to the content of the docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions