Skip to content

Comments

docs: update splitChunks documentation to add usage examples#7097

Merged
chenjiahan merged 2 commits intomainfrom
split_chunks_doc_0131
Jan 31, 2026
Merged

docs: update splitChunks documentation to add usage examples#7097
chenjiahan merged 2 commits intomainfrom
split_chunks_doc_0131

Conversation

@chenjiahan
Copy link
Member

Summary

Updated the explanation of how Rsbuild's splitChunks builds on top of Rspack's optimization.splitChunks, now using clearer language and direct links to the Rspack documentation.

Checklist

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

Copilot AI review requested due to automatic review settings January 31, 2026 03:56
@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 documentation for Rsbuild's splitChunks configuration. The changes aim to enhance user understanding by clarifying the integration with Rspack's chunk splitting capabilities, providing direct links to external resources, and offering practical code examples. This will enable users to more effectively configure chunk splitting for their Rsbuild projects.

Highlights

  • Documentation Clarity: The documentation for Rsbuild's splitChunks configuration has been updated to provide clearer explanations of its relationship with Rspack's optimization.splitChunks.
  • External Documentation Links: Direct links to the relevant Rspack documentation for splitChunks have been added to both English and Chinese versions of the Rsbuild documentation.
  • Usage Examples: A new section with a comprehensive usage example for splitChunks in rsbuild.config.ts has been introduced, demonstrating how to combine Rsbuild-specific preset options with standard Rspack options.
  • Configuration Merging Priority: The documentation now includes a clear explanation of how preset rules are converted and merged with user-defined splitChunks options, explicitly stating that user-defined configurations take higher priority.
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

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 refines the Rsbuild splitChunks documentation in both Chinese and English, improving clarity about its relationship to Rspack's optimization.splitChunks and adding a concrete configuration example. The changes reorganize explanatory text and add a tip explaining how presets are merged with user configuration.

Changes:

  • Clarified that Rsbuild's splitChunks builds on Rspack's optimization.splitChunks with direct links to the relevant Rspack docs.
  • Added a practical rsbuild.config.ts example showing how preset coexists with standard Rspack splitChunks options.
  • Introduced a dedicated section describing non-preset options and a tip explaining the deep-merge behavior and priority of user-defined configuration.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
website/docs/zh/config/split-chunks.mdx Refines Chinese splitChunks docs, adds an example config and tip on how presets are merged with user options, and links to Rspack’s optimization.splitChunks docs.
website/docs/en/config/split-chunks.mdx Mirrors the Chinese updates in English, clarifying API layering, adding an example config, and documenting merge behavior and option compatibility with Rspack.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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 improves the documentation for splitChunks by restructuring the content for better clarity and adding a helpful usage example. The changes make it easier to understand how Rsbuild's splitChunks presets work with Rspack's options. My review includes suggestions to fix broken links in the documentation to ensure users can access the referenced Rspack documentation.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ae70b139c8

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cloudflare-workers-and-pages
Copy link

Deploying rsbuild with  Cloudflare Pages  Cloudflare Pages

Latest commit: ae70b13
Status: ✅  Deploy successful!
Preview URL: https://cf1b48e7.rsbuild-v2.pages.dev
Branch Preview URL: https://split-chunks-doc-0131.rsbuild-v2.pages.dev

View logs

@chenjiahan chenjiahan merged commit a1d10b4 into main Jan 31, 2026
5 checks passed
@chenjiahan chenjiahan deleted the split_chunks_doc_0131 branch January 31, 2026 04:56
@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