Skip to content

Comments

fix: allow to disable default lib-polyfill cache group#7080

Merged
chenjiahan merged 2 commits intomainfrom
lib_polyfill_name_0129
Jan 29, 2026
Merged

fix: allow to disable default lib-polyfill cache group#7080
chenjiahan merged 2 commits intomainfrom
lib_polyfill_name_0129

Conversation

@chenjiahan
Copy link
Member

Summary

Introduces a E2E test case to verify that the default lib-polyfill cache group can be disabled in split chunks configuration.

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings January 29, 2026 05:53
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@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 rsbuild configuration capabilities by allowing users to disable the default lib-polyfill cache group, offering greater flexibility in managing JavaScript polyfill bundling. It includes a new E2E test to confirm this behavior and refines the internal naming of the polyfill cache group for clarity. Additionally, it adjusts the Playwright reporter settings for a better developer experience.

Highlights

  • Feature Enhancement: The lib-polyfill cache group in rsbuild can now be explicitly disabled via configuration, providing more granular control over bundle splitting.
  • Test Coverage: A new end-to-end test suite has been introduced to validate the functionality of disabling the lib-polyfill cache group, ensuring its correct behavior.
  • Internal Refactoring: The internal name of the polyfill cache group within packages/core/src/plugins/splitChunks.ts has been updated from polyfill to lib-polyfill for consistency.
  • CI/CD Improvement: The Playwright test reporter configuration has been optimized to use a concise 'list' reporter for local development while retaining 'list' and 'html' reporters for CI environments.
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 correctly allows disabling the default lib-polyfill cache group by renaming its key. The change is well-tested with a new end-to-end test. I've made one suggestion to improve maintainability by separating an unrelated configuration change into its own pull request. Additionally, it would be beneficial to update the project's documentation to inform users about this new configuration option.

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 adjusts the default split-chunks cache group for polyfills so that it can be disabled via user configuration, and adds an E2E test to guard the behavior. It also slightly refines the Playwright reporter configuration for CI vs local runs.

Changes:

  • Rename the default polyfill split-chunk cache group key to 'lib-polyfill' so that splitChunks.cacheGroups['lib-polyfill'] = false correctly disables it.
  • Add an E2E case (split-chunks/disable-polyfill-cache-group) verifying that disabling the default lib-polyfill cache group removes the corresponding output chunk.
  • Update the Playwright configuration to use the HTML reporter only in CI, using the list reporter for local runs.

Reviewed changes

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

Show a summary per file
File Description
packages/core/src/plugins/splitChunks.ts Aligns the default polyfill cache group key with its name ('lib-polyfill'), enabling users to turn off the default lib-polyfill split via cacheGroups.
e2e/playwright.config.ts Switches Playwright reporter configuration to use [['list'], ['html']] only on CI and 'list' locally, improving local DX while keeping CI reporting unchanged.
e2e/cases/split-chunks/disable-polyfill-cache-group/src/index.js Adds a minimal entry file to satisfy Rsbuild’s default src/index.js entry resolution for the new E2E case.
e2e/cases/split-chunks/disable-polyfill-cache-group/rsbuild.config.ts Adds an E2E config that enables output.polyfill: 'entry' and explicitly disables the lib-polyfill cache group to exercise the new behavior.
e2e/cases/split-chunks/disable-polyfill-cache-group/index.test.ts Introduces an E2E test asserting no JS bundle name contains lib-polyfill when the default lib-polyfill cache group is set to false.

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

@chenjiahan chenjiahan merged commit 188005d into main Jan 29, 2026
5 checks passed
@chenjiahan chenjiahan deleted the lib_polyfill_name_0129 branch January 29, 2026 06:14
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