Skip to content

Conversation

@chenjiahan
Copy link
Member

  • update all dependencies
  • update Rsbuild to v2 beta

Copilot AI review requested due to automatic review settings January 30, 2026 08:42
@gemini-code-assist
Copy link

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 performs a comprehensive update of project dependencies, primarily focusing on migrating to the beta release of Rsbuild v2 and the stable release of Rspress v2. These updates aim to keep the projects current with the latest build tooling, bringing in new features, performance enhancements, and bug fixes from the underlying frameworks and plugins. The changes also include necessary configuration adjustments to align with the updated APIs of these core tools.

Highlights

  • Rsbuild v2 Beta Upgrade: The core Rsbuild package, @rsbuild/core, has been updated to its 2.0.0-beta.0 version across numerous projects, indicating a significant architectural or feature change and requiring careful testing.
  • Rspress v2 Stable Release: Rspress and its associated plugins, including @rspress/core, @rspress/plugin-api-docgen, and @rspress/plugin-preview, have been upgraded from release candidate versions to their stable 2.0.0 release.
  • Widespread Dependency Updates: A broad range of other development dependencies, such as @rsbuild/plugin-react, @rspack/cli, @rspack/core, and various @swc plugins, have received minor or patch version updates to ensure compatibility and incorporate the latest improvements.
  • Configuration Adjustments: Configuration files like rsbuild.config.ts and rspack.config.mjs have been modified to reflect API changes in the updated Rsbuild and Rspack versions, specifically regarding chunk splitting and TypeScript info collection.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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

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 pull request updates dependencies across multiple example projects in the repository, with a focus on upgrading Rsbuild from v1 to v2 beta and updating related tooling packages.

Changes:

  • Update @rspack/cli and @rspack/core from 1.7.3 to 1.7.4 across all rspack examples
  • Upgrade @rsbuild/core from ^1.7.2 to 2.0.0-beta.0 across rsbuild and rstest examples
  • Update various plugins: @rsbuild/plugin-react, @rsbuild/plugin-vue, @rsbuild/plugin-less, @rsbuild/plugin-sass, @rsbuild/plugin-babel, and others
  • Update SWC plugins from ^12.4.0/^13.4.0/^14.4.0 to ^12.5.0/^13.5.0/^14.5.0
  • Update rspress from ^1.47.0 to ^1.47.1 and @RsPress plugins from rc.7 to stable 2.0.0
  • Update next-rspack from 16.1.4 to 16.1.6
  • Update @rsdoctor/rspack-plugin from ^1.5.0 to ^1.5.1
  • Refactor rspack config files to move collectTypeScriptInfo from rspackExperiments to direct property
  • Refactor rsbuild vanilla-extract config to change splitChunks structure

Reviewed changes

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

Show a summary per file
File Description
rstest/rsbuild-adapter/package.json Update @rsbuild/core to v2 beta
rstest/browser-rsbuild-vanilla/package.json Update @rsbuild/core to v2 beta
rstest/browser-rsbuild-react/package.json Update @rsbuild/core and @rsbuild/plugin-react
rspress/custom-theme/package.json Update rspress to 1.47.1
rspress/basic/package.json Update rspress to 1.47.1
rspack/*/package.json (multiple) Update @rspack/cli and @rspack/core to 1.7.4
rspack/type-reexports-presence/rspack.config.mjs Refactor collectTypeScriptInfo API usage
rspack/inline-enum/rspack.config.mjs Refactor collectTypeScriptInfo API usage
rspack/inline-const-enum/rspack.config.mjs Refactor collectTypeScriptInfo API usage
rspack/builtin-swc-loader/package.json Update multiple @swc/plugin-* packages
rslib/*/package.json (multiple) Update @rsbuild/plugin-react and other plugins
rslib/module-doc/package.json Update @RsPress packages from rc.7 to stable 2.0.0
rsdoctor/*/package.json Update @rsdoctor/rspack-plugin and core dependencies
rsbuild/*/package.json (multiple) Update @rsbuild/core to v2 beta and related plugins
rsbuild/vanilla-extract/rsbuild.config.ts Refactor splitChunks configuration structure

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

Comment on lines +13 to 23
splitChunks: {
cacheGroups: {
vanillaCss: {
minSize: 0,
chunks: 'all',
test: /@vanilla-extract\/webpack-plugin/,
priority: 1000,
name: process.env.NODE_ENV === 'development' && 'vanilla-extract',
},
},
},
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The splitChunks configuration has been moved to the root level of the Rsbuild config, but this appears to be incorrect. In Rsbuild, splitChunks should typically be configured under tools.rspack or through the performance.chunkSplit API. The current placement at the root level will likely be ignored or cause a configuration error since splitChunks is not a valid root-level Rsbuild configuration option.

The correct approach for Rsbuild v2 would likely be either:

  1. Keep it under tools.rspack.optimization.splitChunks if using the low-level Rspack API
  2. Use Rsbuild's performance.chunkSplit API with the appropriate override structure for Rsbuild v2

Copilot uses AI. Check for mistakes.
Comment on lines +34 to 36
collectTypeScriptInfo: {
typeExports: true,
},
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The configuration change moves collectTypeScriptInfo from being nested under rspackExperiments to being a direct property of the SWC loader options. This reflects an API change in the newer Rspack version. However, it's important to verify that this API change is actually present in Rspack 1.7.4, as moving from an experimental API to a stable one typically happens with proper deprecation warnings or in major version updates. Please confirm that this API change is documented in the Rspack 1.7.4 changelog.

Copilot uses AI. Check for mistakes.
Comment on lines +31 to 33
collectTypeScriptInfo: {
exportedEnum: true,
},
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The configuration change moves collectTypeScriptInfo from being nested under rspackExperiments to being a direct property of the SWC loader options. This reflects an API change in the newer Rspack version. However, it's important to verify that this API change is actually present in Rspack 1.7.4, as moving from an experimental API to a stable one typically happens with proper deprecation warnings or in major version updates. Please confirm that this API change is documented in the Rspack 1.7.4 changelog.

Copilot uses AI. Check for mistakes.
Comment on lines +34 to 36
collectTypeScriptInfo: {
exportedEnum: 'const-only',
},
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The configuration change moves collectTypeScriptInfo from being nested under rspackExperiments to being a direct property of the SWC loader options. This reflects an API change in the newer Rspack version. However, it's important to verify that this API change is actually present in Rspack 1.7.4, as moving from an experimental API to a stable one typically happens with proper deprecation warnings or in major version updates. Please confirm that this API change is documented in the Rspack 1.7.4 changelog.

Copilot uses AI. Check for mistakes.
},
"devDependencies": {
"@rsbuild/core": "^1.7.2",
"@rsbuild/core": "2.0.0-beta.0",
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

Updating to Rsbuild 2.0.0-beta.0 is a significant change as it's a beta version of a major release. There may be breaking changes, undocumented behavior, or bugs. It's recommended to:

  1. Review the Rsbuild v2 migration guide and breaking changes documentation
  2. Test all affected examples thoroughly to ensure they work with the beta
  3. Consider whether using a beta version in examples is appropriate for production use cases
  4. Be prepared to update to stable v2.0.0 once released

Note that this change affects all rsbuild/* and some rstest/* examples, which is a wide surface area for potential issues.

Copilot uses AI. Check for mistakes.
Copy link

@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 PR updates numerous dependencies, primarily to upgrade Rsbuild to v2 beta. The associated configuration migrations are correct. However, the @rsbuild/core dependency has not been updated in a few packages, creating an inconsistency. Please see the specific comments for details.

"@module-federation/rsbuild-plugin": "^0.23.0",
"@rsbuild/core": "~1.7.2",
"@rsbuild/plugin-react": "^1.4.3",
"@rsbuild/plugin-react": "^1.4.4",

Choose a reason for hiding this comment

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

high

While @rsbuild/plugin-react is updated, the @rsbuild/core dependency on the line above was missed. It should be updated to 2.0.0-beta.0 to be consistent with the other packages in this PR and to fulfill the goal of migrating to Rsbuild v2.

"@module-federation/rsbuild-plugin": "^0.23.0",
"@rsbuild/core": "~1.7.2",
"@rsbuild/plugin-react": "^1.4.3",
"@rsbuild/plugin-react": "^1.4.4",

Choose a reason for hiding this comment

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

high

While @rsbuild/plugin-react is updated, the @rsbuild/core dependency on the line above was missed. It should be updated to 2.0.0-beta.0 to be consistent with the other packages in this PR and to fulfill the goal of migrating to Rsbuild v2.

"devDependencies": {
"@rsbuild/core": "~1.7.2",
"@rsbuild/plugin-react": "^1.4.3",
"@rsbuild/plugin-react": "^1.4.4",

Choose a reason for hiding this comment

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

high

While @rsbuild/plugin-react is updated, the @rsbuild/core dependency on the line above was missed. It should be updated to 2.0.0-beta.0 to be consistent with the other packages in this PR and to fulfill the goal of migrating to Rsbuild v2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants