Skip to content

Comments

docs: enhance code splitting documentation#7103

Merged
chenjiahan merged 5 commits intomainfrom
code_splitting_doc_0201
Feb 1, 2026
Merged

docs: enhance code splitting documentation#7103
chenjiahan merged 5 commits intomainfrom
code_splitting_doc_0201

Conversation

@chenjiahan
Copy link
Member

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

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings February 1, 2026 00:45
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • Enhanced Code Splitting Documentation (English): The English documentation for code splitting has been significantly improved with a clearer introduction, a new tip section defining 'chunk', and a direct reference to Rspack's documentation.
  • Dynamic Import Guidance: A dedicated section on 'Using dynamic import' has been added to the English documentation, providing practical examples for both local and third-party modules, and the previous redundant section has been removed for better flow.
  • Enhanced Code Splitting Documentation (Chinese): The Chinese documentation for code splitting has been similarly updated, including a clearer introduction, a tip section, Rspack reference, and dynamic import examples.
  • Terminology Consistency: Consistent terminology updates have been applied across Chinese documentation files, changing '代码拆分' (code splitting) to '代码分割' (code segmentation/splitting) for improved accuracy and consistency.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 1, 2026

Deploying rsbuild with  Cloudflare Pages  Cloudflare Pages

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

View logs

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Copilot AI review requested due to automatic review settings February 1, 2026 00:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@chenjiahan chenjiahan merged commit f16018f into main Feb 1, 2026
6 checks passed
@chenjiahan chenjiahan deleted the code_splitting_doc_0201 branch February 1, 2026 01:30
@chenjiahan chenjiahan mentioned this pull request Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant