Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

Added a section explaining that built-in JS and CSS transform rules now use oneOf branches, and instructions for updating custom loader configurations

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings January 25, 2026 09:23
@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 enhances the existing v1 to v2 upgrade documentation by introducing a new section that details significant changes to how built-in JavaScript and CSS transform rules are handled. It clarifies the adoption of oneOf branches within these rules and offers practical guidance, including a code snippet, to help users seamlessly update their custom loader configurations to accommodate this architectural shift.

Highlights

  • Documentation Update: The upgrade guide from v1 to v2 has been updated to reflect changes in built-in JavaScript and CSS transform rules.
  • Built-in Rule Changes: Built-in JS and CSS transform rules now utilize oneOf branches for better organization and processing.
  • Custom Loader Configuration Guidance: Instructions and a code example are provided for users to adjust their custom loader configurations, specifically for JavaScript rules, to align with the new oneOf structure (e.g., moving loaders to CHAIN_ID.ONE_OF.JS_TRANSFORM).
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.

@cloudflare-workers-and-pages
Copy link

Deploying rsbuild with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2a192bc
Status: ✅  Deploy successful!
Preview URL: https://0b65ca65.rsbuild-v2.pages.dev
Branch Preview URL: https://migration-builtin-rules-0125.rsbuild-v2.pages.dev

View logs

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 updates the upgrade guide to include information about changes to built-in rules using oneOf. The changes are clear and provide a helpful example for JavaScript rule customization. I've added a few suggestions to improve the documentation's grammar and completeness, specifically regarding the mention of CSS rules without providing further details. Overall, this is a valuable addition to the migration guide.

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 updates the Rsbuild v1 to v2 upgrade guide documentation to inform users about the built-in JS rule changes that now use oneOf branches. The documentation explains how to update custom loader configurations to work with the new structure.

Changes:

  • Added "Built-in rule changes" section to both English and Chinese upgrade guides
  • Documented the JS rule split into JS_TRANSFORM and JS_RAW oneOf branches
  • Provided migration example for users who previously added loaders to CHAIN_ID.RULE.JS

Reviewed changes

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

File Description
website/docs/en/guide/upgrade/v1-to-v2.mdx Added English documentation for built-in JS rule oneOf structure changes with migration example
website/docs/zh/guide/upgrade/v1-to-v2.mdx Added Chinese documentation for built-in JS rule oneOf structure changes with migration example

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

@chenjiahan chenjiahan merged commit 4c9bc5f into main Jan 25, 2026
5 checks passed
@chenjiahan chenjiahan deleted the migration_builtin_rules_0125 branch January 25, 2026 09:27
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