docs: refine source.include and clarify compilation behavior#5345
Merged
chenjiahan merged 1 commit intomainfrom Jun 4, 2025
Merged
docs: refine source.include and clarify compilation behavior#5345chenjiahan merged 1 commit intomainfrom
chenjiahan merged 1 commit intomainfrom
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refines the documentation for Rsbuild’s default source.include behavior—clarifying that JavaScript files outside node_modules are compiled—and removes outdated monorepo configuration examples.
- Simplified the compilation scope descriptions in both English and Chinese guides
- Streamlined the default
source.includesnippet to just two entries - Removed the monorepo-specific
source.includeconfiguration section
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| website/docs/zh/guide/advanced/browser-compatibility.mdx | Updated compilation scope wording, removed numbering |
| website/docs/en/guide/advanced/browser-compatibility.mdx | Updated compilation scope wording, removed numbering |
| website/docs/zh/config/source/include.mdx | Simplified default include bullets, removed monorepo example |
| website/docs/en/config/source/include.mdx | Simplified default include bullets, removed monorepo example |
Comments suppressed due to low confidence (2)
website/docs/zh/config/source/include.mdx:11
- 该条描述指出在任意目录下都编译 TS/JSX 文件,但默认示例中的
defaultInclude首个条件{ not: /node_modules/ }同样排除了node_modules目录。请将描述修改为“非node_modules目录下的 TypeScript 和 JSX 文件”以保持一致。
- 任意目录下的 TypeScript 和 JSX 文件,匹配的文件后缀为 `.ts`、`.tsx`、`.jsx`、`.mts`、`.cts`。
website/docs/en/config/source/include.mdx:11
- This bullet says TS/JSX are compiled in any directory, but the
defaultIncludesnippet’s{ not: /node_modules/ }filter also excludesnode_modules. Please update the text to “TypeScript and JSX files not in thenode_modulesdirectory” for consistency.
- TypeScript and JSX files in any directory, matching file extensions `.ts`, `.tsx`, `.jsx`, `.mts`, `.cts`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Revised the description of Rsbuild's default compilation settings to clarify that JavaScript files outside the
node_modulesdirectory are compiled, and simplified the code snippet for the default value ofsource.include.Removed the section explaining how to configure
source.includefor compiling monorepo libraries, which is no longer needed.Related Links
Checklist