Rspack V2 Upgrade

rstackjs/agent-skills/skills/rspack-v2-upgrade

by rstackjs2966acbef746No license95 starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated today

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

Instructions onlySoftware Development
AI-generated overview

Guides upgrading a Rspack 1.x project to v2, covering dependency and configuration changes.

What it does
Walks through a six-step migration workflow: confirming the current Rspack setup from package.json and the config file, consulting the official migration guide, planning applicable breaking changes, upgrading the Rspack packages to v2, applying config and code changes, and validating with build, dev, test, or type-check commands. It produces a list of required changes and an updated, validated project configuration.
When to use it
Use when a project still runs Rspack 1.x and needs to move to v2, especially when dependencies, config options, or plugin APIs must be updated. It also fits when you want a structured checklist of breaking changes before touching the build setup.
Requirements
No scripts or special tooling beyond the agent; the project being upgraded must have Rspack 1.x dependencies and a Rspack config file, and network access is needed to consult the official migration guide.

Rspack 1.x to v2 upgrade

Workflow

  1. Confirm current setup

    • Read package.json to identify Rspack packages in use.
    • Locate the Rspack config file (commonly rspack.config.(ts|js|mjs|cjs)).
  2. Open the official migration guide

  3. Plan required changes

    • 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

    • Upgrade Rspack packages to v2: @rspack/core, @rspack/cli, @rspack/dev-server, @rspack/plugin-react-refresh.
  5. Apply migration changes

    • Update the Rspack config and related code according to the official guide.
    • Remove deprecated or unsupported options.
  6. Validate

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

Source and attribution

Source:rstackjs/agent-skillsinskills/rspack-v2-upgradeat commit2966acb

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal