Rsbuild V2 Upgrade

rstackjs/agent-skills/skills/rsbuild-v2-upgrade

作者 rstackjs2966acbef746無授權條款95 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫今天更新

Use when upgrading a Rsbuild 1.x project to v2, including dependency and configuration updates.

AI 產生的概覽

指導將 Rsbuild 1.x 專案升級至 v2,涵蓋相依套件升級與設定調整。

功能
此技能引導代理將 Rsbuild 1.x 專案遷移至 Rsbuild v2。它會檢視 package.json 與 Rsbuild 設定檔,將專案與官方 v1 到 v2 升級指南比對,並列出適用的破壞性變更。接著升級 @rsbuild/core 與 Rsbuild 外掛,更新設定與程式碼,並透過執行建置、開發、測試或型別檢查進行驗證。
適用情境
適用於專案仍使用 Rsbuild 1.x、需要遷移至 v2 的情況。適合需要讓相依套件、外掛版本與設定選項與新主版本保持一致的維護工作。
執行需求
此技能不隨附指令碼,僅為操作說明。需要存取專案的 package.json 與 Rsbuild 設定檔,需要套件管理工具或 npx 來更新相依套件,並需要網路存取以查閱官方 Rsbuild 升級指南。

Rsbuild v1 to v2 upgrade

Workflow

  1. Confirm current setup

    • Read package.json to identify Rsbuild and plugin packages in use.
    • Locate the Rsbuild config file (commonly rsbuild.config.(ts|js|mjs|cjs)).
  2. Open the official upgrade guide

  3. Plan the upgrade path

    • Compare the current project config with the migration guide.
    • List breaking changes that apply to the project’s current config and plugins.
    • Note any removed or renamed options, defaults, or plugin APIs.
  4. Update dependencies

    • Bump @rsbuild/core to v2
    • Bump Rsbuild plugins to latest versions via npx taze major --include /rsbuild/ -w -r
  5. Apply config and code changes

    • Update the Rsbuild config to match v2 options and defaults.
    • Remove deprecated or unsupported settings.
  6. Validate

    • Run the build and dev commands.
    • Run project tests or type checks.
    • Fix any warnings or errors surfaced by the new version.

來源與署名

來源:rstackjs/agent-skills位於skills/rsbuild-v2-upgrade提交2966acb

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架