feat: upgrade to Rsbuild 2.0 and Rspack 2.0#430
Merged
Patrick Lafrance (patricklafrance) merged 2 commits intoMay 12, 2026
Conversation
- Updated package configurations and API to align with new Rsbuild 2.0 features, improvements, and deprecations. - Added new options: `polyfill`, `splitChunks`, and `setup` to `defineBuildConfig` and `defineDevConfig`. - Introduced migration documentation for Rsbuild v2.0 and Rslib v2.0, detailing package updates, Node.js requirements, and changed defaults. - Refactored internal optimization configuration to use Rsbuild's new output structure.
Copilot started reviewing on behalf of
Patrick Lafrance (patricklafrance)
May 12, 2026 23:01
View session
@workleap/browserslist-config
@workleap/eslint-configs
@workleap/postcss-configs
@workleap/rsbuild-configs
@workleap/rslib-configs
@workleap/stylelint-configs
@workleap/swc-configs
@workleap/tsup-configs
@workleap/typescript-configs
@workleap/webpack-configs
commit: |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates @workleap/rsbuild-configs to align with the Rsbuild 2.0 / Rspack 2.0 ecosystem, including new configuration options, revised optimization/minification handling, and accompanying migration documentation.
Changes:
- Added
polyfillandsplitChunksoptions todefineBuildConfig, and asetupoption todefineDevConfig. - Refactored optimization/minification configuration to match Rsbuild v2 output/minify and optimization shapes.
- Added migration docs for Rsbuild/Rslib v2 and updated CI cache keys and dependency lockfiles (including
core-js).
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Locks updated dependency graph, including core-js wiring with Rsbuild/Rslib packages. |
| packages/rsbuild-configs/package.json | Adds core-js as a direct dependency to preserve polyfill support. |
| packages/rsbuild-configs/src/build.ts | Introduces polyfill/splitChunks options and refactors minify/optimization handling. |
| packages/rsbuild-configs/src/dev.ts | Adds setup passthrough to Rsbuild server.setup. |
| packages/rsbuild-configs/src/storybook.ts | Changes Storybook default lazyCompilation behavior. |
| packages/rsbuild-configs/tests/build.test.ts | Adds/updates tests for new build options and refactored helpers. |
| packages/rsbuild-configs/tests/dev.test.ts | Adds test coverage for the new setup dev option. |
| docs/rslib/migrate-to-v2.md | Adds Rslib v2 migration guidance for consumers. |
| docs/rsbuild/migrate-to-v2.md | Adds Rsbuild v2 migration guidance and describes new/changed defaults. |
| docs/rsbuild/configure-build.md | Documents new polyfill and splitChunks options. |
| docs/rsbuild/configure-dev.md | Documents new setup option. |
| docs/rsbuild/configure-storybook.md | Updates lazyCompilation default documentation to match code. |
| .github/workflows/pr-pkg.yml | Updates Turborepo cache key namespace (v11). |
| .github/workflows/claude.yml | Updates Turborepo cache key namespace (v11). |
| .github/workflows/changeset.yml | Updates Turborepo cache key namespace (v11). |
| .changeset/rsbuild-v2-options.md | Declares release note for new Rsbuild v2-aligned options and refactor. |
| .changeset/nice-sails-teach.md | Adds an additional changeset entry (currently informal/duplicative). |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)
packages/rsbuild-configs/src/storybook.ts:35
defineStorybookConfignow defaultslazyCompilationtotrue, which is a behavior change for consumers. There’s no test asserting the default value (or the override behavior) intests/storybook.test.ts, and this change isn’t mentioned in the changeset/migration notes; consider adding coverage and calling it out in release notes if intentional.
const {
plugins = [],
lazyCompilation = true,
sourceMap = {
js: "cheap-module-source-map",
css: true
},
.changeset/nice-sails-teach.md:6
- This changeset summary reads informal/unprofessional ("my bad") and is also largely duplicative of
rsbuild-v2-options.md. Consider deleting this changeset or rewriting it as a concise, user-facing release note without commentary about prior versioning mistakes.
(Should have been 4.0.0 my bad) - Update the package configurations and API to match the new Rsbuild 2.0 features / improvements / deprecation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
polyfill,splitChunks, andsetuptodefineBuildConfiganddefineDevConfig.