Skip to content

docs: add default behavior reference - #1917

Merged
Timeless0911 merged 3 commits into
mainfrom
david/docs-default-behavior
Sep 14, 2026
Merged

Timeless0911 merged 3 commits into
mainfrom
david/docs-default-behavior

Conversation

@Timeless0911

Copy link
Copy Markdown
Contributor

Motivation

Rslib's library-specific defaults and differences from Rsbuild/Rspack are scattered across the docs, making output behavior easy to misinterpret.

Closes #1883.

Changes

Add an English and Chinese default behavior reference under the configuration overview, covering effective defaults, their rationale, and links to the options used to adjust them. Update related configuration and environment variable docs to clarify format-dependent behavior and distinguish the build process's NODE_ENV from output replacement and build mode.

Copilot AI lite review requested due to automatic review settings September 10, 2026 11:27
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-10T11:41:20.748515Z 8badb4a New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Deploying rslib with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8badb4a
Status: ✅  Deploy successful!
Preview URL: https://ffae7941.rslib.pages.dev
Branch Preview URL: https://david-docs-default-behavior.rslib.pages.dev

View logs

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.

🟢 Approval recommended

The changes are documentation-only and align with the linked issue’s goal; the remaining feedback is limited to minor reference-link polish.

Pull request overview

Adds a consolidated “Default behavior” reference (EN/ZH) to centralize Rslib’s library-build defaults and intentional deviations from Rsbuild/Rspack, and updates related docs to clarify format-dependent NODE_ENV replacement and the distinction between build-process NODE_ENV vs internal mode.

Changes:

  • Add new “Default behavior / 默认行为” reference pages under the config overview (EN + ZH) with tables linking to relevant options.
  • Clarify process.env.NODE_ENV handling across formats in the env-vars docs, including how pre-setting NODE_ENV affects replacement vs how internal mode drives optimizations.
  • Update related config docs (e.g., output.assetPrefix, output.filenameHash, output.target, lib.format) and navigation metadata to link to the new reference.
File summaries
File Description
website/docs/en/config/default-behavior.mdx New consolidated default-behavior reference (EN).
website/docs/zh/config/default-behavior.mdx New consolidated default-behavior reference (ZH).
website/docs/en/guide/advanced/env-vars.mdx Clarifies format-dependent env replacement and NODE_ENV vs internal mode (EN).
website/docs/zh/guide/advanced/env-vars.mdx Clarifies format-dependent env replacement and NODE_ENV vs internal mode (ZH).
website/docs/en/config/rsbuild/output.mdx Documents format-dependent defaults (e.g., assetPrefix, filenameHash, target) (EN).
website/docs/zh/config/rsbuild/output.mdx Documents format-dependent defaults (e.g., assetPrefix, filenameHash, target) (ZH).
website/docs/en/config/lib/format.mdx Links lib.format to the consolidated default-behavior reference (EN).
website/docs/zh/config/lib/format.mdx Links lib.format to the consolidated default-behavior reference (ZH).
website/docs/en/config/index.mdx Adds a pointer from config overview to “Default behavior” (EN).
website/docs/zh/config/index.mdx Adds a pointer from config overview to “默认行为” (ZH).
website/docs/en/config/_meta.json Adds the new page to the EN config sidebar ordering.
website/docs/zh/config/_meta.json Adds the new page to the ZH config sidebar ordering.
Review details
  • Files reviewed: 12/12 changed files
  • Comments generated: 4
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread website/docs/en/config/default-behavior.mdx Outdated
Comment thread website/docs/en/config/default-behavior.mdx Outdated
Comment thread website/docs/zh/config/default-behavior.mdx Outdated
Comment thread website/docs/zh/config/default-behavior.mdx Outdated
@Timeless0911
Timeless0911 merged commit 1b7707f into main Sep 14, 2026
12 checks passed
@Timeless0911
Timeless0911 deleted the david/docs-default-behavior branch September 14, 2026 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants