Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

Expanded and reorganized the list of ONE_OF chain IDs to include branches for JS, CSS, Less, Sass, Stylus, and SVG, and explained that these are not top-level rules but branches under specific rule types.

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings January 26, 2026 02:49
@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 clarity and completeness of the bundlerChain configuration documentation. It provides a more detailed explanation of how ONE_OF chain IDs function, particularly by enumerating specific branches for various language and asset types, ensuring users have a clearer understanding of the available configuration options and their hierarchical structure.

Highlights

  • Expanded CHAIN_ID.ONE_OF Documentation: The documentation for CHAIN_ID.ONE_OF has been significantly expanded to include specific branches for JavaScript, CSS, Less, Sass, and Stylus rules. This now details _MAIN, _RAW, and _INLINE variants for these rule types.
  • Clarified ONE_OF Rule Hierarchy: The description for CHAIN_ID.ONE_OF has been updated to explicitly state that these IDs represent branches within existing rules (e.g., RULE.JS, RULE.CSS) and are not top-level rules themselves, providing better clarity on their usage.
  • RULE Table Reorganization: The RULE table has been reorganized. RULE.LESS and RULE.SASS entries were moved to include their respective plugin dependencies, and the RULE.YAML entry has been removed.
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 improves the documentation for bundlerChain by expanding the list of ONE_OF chain IDs and clarifying their usage as branches under main rule types. The changes are well-organized and make the documentation more accurate and easier to understand. I've found a minor typo in both the English and Chinese documentation that I've flagged for correction.

@chenjiahan chenjiahan merged commit 5053be7 into main Jan 26, 2026
10 checks passed
@chenjiahan chenjiahan deleted the chain_id_0126 branch January 26, 2026 02:51
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 documentation for bundler chain IDs to reflect the new oneOf structure introduced in PR #7037. The documentation now includes comprehensive listings of ONE_OF chain IDs for JS, CSS, Less, Sass, Stylus, and SVG processing branches.

Changes:

  • Reorganized RULE entries to group plugin-dependent rules (LESS, SASS, STYLUS) together with their plugin requirements noted
  • Expanded ONE_OF section to document all branch IDs for JS, CSS, and preprocessor rules (Less, Sass, Stylus)
  • Added clarifying text explaining that ONE_OF entries are branches within rules, not top-level rules
  • Updated SVG-related ONE_OF descriptions for better clarity

Reviewed changes

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

File Description
website/docs/en/config/tools/bundler-chain.mdx Updated English documentation with reorganized RULE entries and expanded ONE_OF chain IDs
website/docs/zh/config/tools/bundler-chain.mdx Updated Chinese documentation with reorganized RULE entries and expanded ONE_OF chain IDs

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

| `ONE_OF.STYLUS_INLINE` | `?inline` branch under `RULE.STYLUS` |
| `ONE_OF.SVG_URL` | SVG branch for emitting a separate file |
| `ONE_OF.SVG_INLINE` | SVG branch for inlining as data URI |
| `ONE_OF.SVG_ASSETS` | SVG branch for auto selection between data URI and file |
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

The constant name should be ONE_OF.SVG_ASSET (singular) not ONE_OF.SVG_ASSETS (plural). According to the source code in packages/core/src/configChain.ts line 91, it is defined as SVG_ASSET: 'svg-asset'.

Suggested change
| `ONE_OF.SVG_ASSETS` | SVG branch for auto selection between data URI and file |
| `ONE_OF.SVG_ASSET` | SVG branch for auto selection between data URI and file |

Copilot uses AI. Check for mistakes.
| `ONE_OF.STYLUS_INLINE` | `RULE.STYLUS` 下的 `?inline` 分支 |
| `ONE_OF.SVG_URL` | SVG 输出为独立文件的分支 |
| `ONE_OF.SVG_INLINE` | SVG 内联为 data URI 的分支 |
| `ONE_OF.SVG_ASSETS` | SVG 在 data URI 与独立文件之间自动选择的分支 |
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

The constant name should be ONE_OF.SVG_ASSET (singular) not ONE_OF.SVG_ASSETS (plural). According to the source code in packages/core/src/configChain.ts line 91, it is defined as SVG_ASSET: 'svg-asset'.

Suggested change
| `ONE_OF.SVG_ASSETS` | SVG 在 data URI 与独立文件之间自动选择的分支 |
| `ONE_OF.SVG_ASSET` | SVG 在 data URI 与独立文件之间自动选择的分支 |

Copilot uses AI. Check for mistakes.
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