npm / @vitejs/plugin-react
@vitejs/plugin-react
What changed in @vitejs/plugin-react 5 to 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.
4 breaking1 deprecations4 new APIs and options1 performance2 tooling7 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@vitejs/plugin-react 614 changes
Breaking changes 3
The option works with oxc-transform-react >= 0.148; using the compiler option requires oxc-transform-react >= 0.152 as a peer dependency.
The plugin no longer provides Babel-related features, including the babel configuration option; use @rolldown/plugin-babel for Babel transforms.
Vite 7 and below are no longer supported; projects using Vite 7 should upgrade to Vite 8.
Deprecations 1
The option is deprecated; use the builtin compiler.reportDiagnostics instead.
New APIs and options 3
Recoverable React Compiler diagnostics are no longer logged by default; set this option to true to log them through Vite.
Enables experimental native React Compiler support when set to true; install oxc-transform-react to use it.
React compiler users can use this preset with @rolldown/plugin-babel for easier setup and a preconfigured filter to improve build performance.
Performance 1
The filter is now linear, avoiding the performance regression caused by the non-linear filter in v6.0.3.
Tooling 1
The peer dependency range now includes ^0.2.0, allowing projects using that version to satisfy the peer dependency.
Fixes and other changes 5
Adding or removing a component from a compound component now triggers HMR invalidation on the file and propagates it to importers, preventing stale updates.
With the compiler enabled, TS files no longer trigger Fast Refresh, avoiding runtime errors.
The React Compiler transform now uses the environment sourcemap option instead of the top-level option when builder.sharedPlugins is enabled.
Fixed the
$RefreshSig$ is not definederror when runningvite devwithNODE_ENV=production.The type now allows all options for reactCompilerPreset, rather than only compilationMode and target.
@vitejs/plugin-react 55 changes
Breaking changes 1
The plugin now uses optimizeDeps.rolldownOptions to support newer rolldown-vite; update rolldown-vite if using an older version.
New APIs and options 1
SSR applications can import this virtual module at the top of their client entry to initialize the HMR runtime instead of manually calling transformIndexHtml.
Tooling 1
The plugin is compatible with Vite 8, which is added to its peerDependencies range.
Fixes and other changes 2
Babel is no longer incorrectly skipped when babel.overrides is configured without top-level plugins or presets, so override configurations are processed.
The plugin now uses the transform.jsx option to support raw Rolldown 1.0.0-beta.44+, which removed the top-level jsx option.