docs: enhance code splitting documentation#7103
Conversation
Summary of ChangesHello @chenjiahan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly improves the clarity and comprehensiveness of the code splitting documentation for both English and Chinese users. It refines the introductory explanations, provides practical guidance on using dynamic imports with concrete examples, and ensures consistent terminology across the Chinese documentation, ultimately helping users better understand and implement performance optimization strategies. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request significantly enhances the code splitting documentation by providing a clearer introduction, adding practical examples with dynamic imports, and restructuring the content for better readability. The changes also standardize terminology from "代码拆分" to "代码分割" in the Chinese documentation, which improves consistency. I've left one comment regarding a minor inconsistency in the use of terminology in the Chinese translation.
Deploying rsbuild with
|
| Latest commit: |
8f52f31
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://00688ed4.rsbuild-v2.pages.dev |
| Branch Preview URL: | https://code-splitting-doc-0201.rsbuild-v2.pages.dev |
There was a problem hiding this comment.
Pull request overview
This PR enhances the code splitting documentation by improving the introduction, restructuring content, and providing clearer examples. The changes align the terminology across Chinese documentation from "代码拆分" to "代码分割" for better consistency.
Changes:
- Renamed "代码拆分" to "代码分割" across all Chinese documentation for consistent terminology
- Reorganized documentation to place dynamic import section before chunking strategies, emphasizing its importance
- Added tip boxes explaining what chunks are and improved the introductory content
- Included practical code examples showing both local module and third-party dependency dynamic imports
- Updated external references to point to Rspack documentation
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| website/docs/zh/guide/start/features.mdx | Updated terminology from "代码拆分" to "代码分割" in the features table |
| website/docs/zh/guide/optimization/optimize-bundle.mdx | Changed wording from "拆分" to "分割" for consistency with new terminology |
| website/docs/zh/guide/optimization/code-splitting.mdx | Major restructuring: improved introduction, added tip section, moved dynamic import section to the top, and added practical examples |
| website/docs/zh/config/performance/chunk-split.mdx | Updated cross-reference link text from "代码拆分" to "代码分割" |
| website/docs/en/guide/optimization/code-splitting.mdx | Enhanced English documentation with same structural improvements: better introduction, tip section, reorganized dynamic import section with examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Enhanced the guide with a clearer introduction to code splitting, added a tip section, referenced Rspack documentation, and included practical examples demonstrating dynamic import for both local and third-party modules.
Checklist