Skip to content

docs: add publishConfig example for exports.source - #2029

Merged
Timeless0911 merged 6 commits into
mainfrom
docs/exports-publish-config-example
Nov 17, 2026
Merged

Timeless0911 merged 6 commits into
mainfrom
docs/exports-publish-config-example

Conversation

@elecmonkey

Copy link
Copy Markdown
Member

Motivation

The exports.source docs say that exports points to the source files and the build outputs go to publishConfig.exports, but they never show what package.json looks like afterwards. It is also unclear that publishConfig.exports only takes effect when the package manager applies it while packing.

Changes

Add a source: true example to exports.source in the English and Chinese docs, showing the generated exports and publishConfig.exports. Document that other existing publishConfig fields are kept and that an existing publishConfig.exports is removed when source is not true.

Also note that pnpm and Yarn Berry replace exports with publishConfig.exports when packing.

Copilot AI balanced review requested due to automatic review settings November 13, 2026 08:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Deploying rslib with  Cloudflare Pages  Cloudflare Pages

Latest commit: d6d20fd
Status: ✅  Deploy successful!
Preview URL: https://2390e6fc.rslib.pages.dev
Branch Preview URL: https://docs-exports-publish-config.rslib.pages.dev

View logs

Comment thread website/docs/zh/config/lib/exports.mdx Resolved
Comment thread website/docs/zh/config/lib/exports.mdx Resolved
Comment thread website/docs/zh/config/lib/exports.mdx Resolved
Comment thread website/docs/zh/config/lib/exports.mdx Resolved
@Timeless0911
Timeless0911 merged commit 487a80b into main Nov 17, 2026
13 checks passed
@Timeless0911
Timeless0911 deleted the docs/exports-publish-config-example branch November 17, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants