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 从公开仓库中收录这些内容。

举报或申请下架