Repository navigation
break(rsdoctor): upgrade to Rsdoctor v2 for Rspack sites, keep Rsdoctor v1 for Webpack sites (AI-assisted) - #12734
Merged
slorber merged 1 commit intoOct 16, 2026
Conversation
…or v1 for Webpack sites (AI-assisted) Rsdoctor v2 only supports Rspack: Rspack sites now use @rsdoctor/core v2, and Webpack sites keep using @rsdoctor/webpack-plugin v1. Each package is imported lazily, only for the current bundler. A single Rsdoctor v2 plugin instance is applied to both the client and server compilers so that they are merged in one report. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Size Change: +620 B (+0.01%) Total Size: 12.1 MB 📦 View Changed
ℹ️ View Unchanged
|
⚡️ Lighthouse report for the deploy preview of this PR
|
|
Size Change: +620 B (+0.01%) Total Size: 12.1 MB 📦 View Changed
ℹ️ View Unchanged
|
7 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking Changes
@docusaurus/plugin-rsdoctornow uses Rsdoctor v2 for Rspack sites (the default). Webpack sites keep using Rsdoctor v1, because Rsdoctor v2 doesn't support Webpack.For Rspack sites,
rsdoctorOptionsare now Rsdoctor v2 options:migrateRsdoctorOptions(), which logs a warning for each one to migrate. See the Rsdoctor v2 migration guide.disableTOSUpload,supports.banner…).build/__server/.rsdoctortobuild/.rsdoctor/compilers/server.Webpack sites are not affected.
Motivation
Rsdoctor v2 is smaller and faster (56% smaller install, 57% faster analysis according to the release notes), and merges multi-compiler builds in one report.
Implementation:
@rsdoctor/corev2, with a singleRsdoctorRspackPlugininstance applied to both compilers. Rsdoctor v2 only merges plugin instances created in the same tick, and Docusaurus callsconfigureWebpack()for the client and server at different times. The compilernameis set so that reports are namedclientandserver(v2 has nonameoption anymore).@rsdoctor/webpack-pluginv1 withRsdoctorWebpackMultiplePlugin.@rsdoctor/core@2.0.0was released on Oct 15, so its packages are added tominimumReleaseAgeExclude.@rsdoctor/*Dependabot group is removed: the 2 packages are now on different major versions on purpose, and no longer share a pinned dependency.Stacked on top of #12733: Webpack + Rsdoctor v1 builds crash on
mainwithout it.Test Plan
Local website builds:
pnpm build:website:fast:rsdoctor(Rspack, Rsdoctor v2): build succeeds, the Rsdoctor UI shows a single report with aclient/servercompiler switcherDOCUSAURUS_SLOWER=true pnpm build:website:fast:rsdoctor(Webpack, Rsdoctor v1): build succeedsBoth Rsdoctor versions print their linter alerts as build warnings. With v2, the website prints many
E1008 cjs-requirewarnings, mostly for therequire()calls of MDX images. They can be turned off withlinter.rules.Test links
Deploy preview: https://deploy-preview-12734--docusaurus-2.netlify.app/docs/api/plugins/@docusaurus/plugin-rsdoctor
Related issues/PRs
🤖 Generated with Claude Code