berry icon indicating copy to clipboard operation
berry copied to clipboard

docs(manifest): add documentation for exports field

Open SaifUrRehman2k opened this issue 1 month ago • 0 comments

What's Changed

Manifest documentation mentions export without actually documenting

The exports field in package.json was mentioned in the manifest docs but not properly documented.
This made it unclear to users how to define entry points, conditional exports, or subpath exports.

Closes #6909 ...

How did I fix it?

I added documentation for the exports field in the manifest schema.

  • Defined exports as the recommended way to describe package entry points.
  • Added examples for main entry ("."), subpaths ("./cli"), and conditional exports ("import", "require").
  • Updated the schema to allow both string and object values with patternProperties for flexibility.

...

Checklist

  • [x] I have read the Contributing Guide.
  • [x] I have set the packages that need to be released for my changes to be effective.
  • [x] I will check that all automated PR checks pass before the PR gets reviewed.

SaifUrRehman2k avatar Nov 27 '25 11:11 SaifUrRehman2k