Migrate to Rsdoctor 2.0
Rsdoctor 2.0 consolidates the package structure around Rspack. This release removes several standalone packages. Update dependencies and imports together to avoid resolving a 1.x package with 2.0 code.
Check your bundler
Rsdoctor 2.0 requires Node.js 22.18 or later and Rspack 2.0 or later. Rspack 1.x is no longer supported. webpack support and @rsdoctor/webpack-plugin have also been removed.
- For an Rspack-based project, continue with this guide.
- For a webpack project, stay on Rsdoctor 1.x or migrate the project to Rspack before upgrading Rsdoctor.
Update the Rspack plugin
Replace @rsdoctor/rspack-plugin with @rsdoctor/core:
Rsdoctor 2.0 packages are ESM-only. Update the package path in the existing ESM import:
If a 1.x configuration uses CommonJS require(), replace it with the ESM import shown above.
@rspack/core remains an optional peer dependency of @rsdoctor/core, with a minimum supported version of 2.0. Your Rspack-based build tool normally provides it. Install @rspack/core in projects that use Rspack directly.
Rsdoctor 2.0 requires the Rsdoctor native plugin built into Rspack for module and chunk graph collection. Remove the former experiments.enableNativePlugin option because the native path is now always enabled. If the build reports that experiments.RsdoctorPlugin is unavailable, upgrade the Rspack dependency supplied by your project or framework.
CLI migration
@rsdoctor/cli remains the rsdoctor command package. Use the same version of @rsdoctor/cli and @rsdoctor/core:
The command names and Node.js API remain available. See the CLI tutorial for current usage.
AI workflow migration
Rsdoctor 2.0 removes @rsdoctor/mcp-server and no longer provides an MCP server. Migrate all Rsdoctor AI-assisted analysis workflows to @rsdoctor/agent-cli:
Agent CLI is the replacement workflow, but it is not an MCP-compatible or drop-in API replacement. Complete the following changes instead of only replacing the package name:
-
Remove Rsdoctor MCP entries from configurations such as
.cursor/mcp.jsonand.vscode/mcp.json. -
Remove scripts or automation that start
npx @rsdoctor/mcp-server. -
Generate
rsdoctor-data.json, then run Agent CLI directly against that file: -
Update AI agents and automation to invoke
rsdoctor-agentand consume its structured JSON output. The Rsdoctor analysis skill can manage this workflow for supported coding agents.
Agent CLI reads the data file directly, so MCP-specific options such as server ports and compiler selection no longer apply. See AI for installation, data generation, and more command examples.
Configuration migration
Package migration does not automatically update removed or deprecated configuration fields. Follow the configuration migration guide for mode, brief, output.compressData, and related output options.
Verify the upgrade
After updating dependencies and imports:
-
Search the application for removed package names:
-
Reinstall dependencies with the project's package manager.
-
Run the project's production build and confirm that Rsdoctor generates a report.
-
Open the report and verify the overview, compilation, and bundle analysis pages used by the project.
-
If the project uses
@rsdoctor/clior@rsdoctor/agent-cli, run the relevant command against newly generated Rsdoctor data.

