berry
berry copied to clipboard
docs(manifest): add documentation for exports field
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
exportsas 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
patternPropertiesfor 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.