Skip to content

feat: upgrade to Rsbuild 2.0 and Rspack 2.0#430

Merged
Patrick Lafrance (patricklafrance) merged 2 commits into
mainfrom
feat/update-rsbuild-api-for-2.0
May 12, 2026
Merged

feat: upgrade to Rsbuild 2.0 and Rspack 2.0#430
Patrick Lafrance (patricklafrance) merged 2 commits into
mainfrom
feat/update-rsbuild-api-for-2.0

Conversation

@patricklafrance
Copy link
Copy Markdown
Member

  • 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.

- 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 AI review requested due to automatic review settings May 12, 2026 23:01
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 12, 2026

Open in StackBlitz

@workleap/browserslist-config

pnpm add https://pkg.pr.new/@workleap/browserslist-config@430

@workleap/eslint-configs

pnpm add https://pkg.pr.new/@workleap/eslint-configs@430

@workleap/postcss-configs

pnpm add https://pkg.pr.new/@workleap/postcss-configs@430

@workleap/rsbuild-configs

pnpm add https://pkg.pr.new/@workleap/rsbuild-configs@430

@workleap/rslib-configs

pnpm add https://pkg.pr.new/@workleap/rslib-configs@430

@workleap/stylelint-configs

pnpm add https://pkg.pr.new/@workleap/stylelint-configs@430

@workleap/swc-configs

pnpm add https://pkg.pr.new/@workleap/swc-configs@430

@workleap/tsup-configs

pnpm add https://pkg.pr.new/@workleap/tsup-configs@430

@workleap/typescript-configs

pnpm add https://pkg.pr.new/@workleap/typescript-configs@430

@workleap/webpack-configs

pnpm add https://pkg.pr.new/@workleap/webpack-configs@430

commit: f55b851

Copy link
Copy Markdown
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 @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 polyfill and splitChunks options to defineBuildConfig, and a setup option to defineDevConfig.
  • 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

  • defineStorybookConfig now defaults lazyCompilation to true, which is a behavior change for consumers. There’s no test asserting the default value (or the override behavior) in tests/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.

Comment thread packages/rsbuild-configs/src/build.ts Outdated
Comment thread packages/rsbuild-configs/src/build.ts Outdated
@patricklafrance Patrick Lafrance (patricklafrance) merged commit 0243027 into main May 12, 2026
7 checks passed
@patricklafrance Patrick Lafrance (patricklafrance) deleted the feat/update-rsbuild-api-for-2.0 branch May 12, 2026 23:18
@github-actions github-actions Bot mentioned this pull request May 12, 2026
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