unstale

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-11-30.

8 breaking2 deprecations5 new APIs and options1 performance1 behavior and defaults5 tooling9 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@vitejs/plugin-react 619 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.

    6.1.2release notes

  • The plugin no longer provides Babel-related features, including the babel configuration option; use @rolldown/plugin-babel for Babel transforms.

    6.0.0release notes

  • Vite 7 and below are no longer supported; projects using Vite 7 should upgrade to Vite 8.

    6.0.0release notes

Deprecations 1

  • The option is deprecated; use the builtin compiler.reportDiagnostics instead.

    6.1.2release notes

New APIs and options 4

  • Adds an option to skip fast refresh for certain files that won't run in the browser.

    6.2.0release notes

  • Recoverable React Compiler diagnostics are no longer logged by default; set this option to true to log them through Vite.

    6.1.1release notes

  • Enables experimental native React Compiler support when set to true; install oxc-transform-react to use it.

    6.1.0release notes

  • React compiler users can use this preset with @rolldown/plugin-babel for easier setup and a preconfigured filter to improve build performance.

    6.0.0release notes

Performance 1

  • The filter is now linear, avoiding the performance regression caused by the non-linear filter in v6.0.3.

    6.0.5release notes

Tooling 3

  • Expands the peer dependency version range from ^0.152.0 to >=0.152.0 <0.157.0.

    6.2.0release notes

  • Expands the peer dependency version range from ^0.1.7 || ^0.2.0 to ^0.1.7 || ^0.2.0 || ^0.3.0.

    6.2.0release notes

  • The peer dependency range now includes ^0.2.0, allowing projects using that version to satisfy the peer dependency.

    6.0.1release notes

Fixes and other changes 7

  • The preset now refers to its Babel preset by module path instead of by function, allowing it to be sent to worker threads when using @rolldown/plugin-babel's parallel option.

    6.3.0release notes

  • Fixed the option not working.

    6.2.1release notes

  • Adding or removing a component from a compound component now triggers HMR invalidation on the file and propagates it to importers, preventing stale updates.

    6.1.2release notes

  • With the compiler enabled, TS files no longer trigger Fast Refresh, avoiding runtime errors.

    6.1.2release notes

  • The React Compiler transform now uses the environment sourcemap option instead of the top-level option when builder.sharedPlugins is enabled.

    6.1.1release notes

  • Fixed the $RefreshSig$ is not defined error when running vite dev with NODE_ENV=production.

    6.0.4release notes

  • The type now allows all options for reactCompilerPreset, rather than only compilationMode and target.

    6.0.2release notes

@vitejs/plugin-react 512 changes

Breaking changes 5

  • The plugin now uses optimizeDeps.rolldownOptions to support newer rolldown-vite; update rolldown-vite if using an older version.

    5.1.1release notes

  • The disableOxcRecommendation option has been removed.

    5.0.0release notes

  • The plugin now requires Node 20.19+ or 22.12+.

    5.0.0release notes

  • The plugin no longer automatically adds react and react-dom to resolve.dedupe; add them manually to retain the previous behavior.

    5.0.0release notes

  • Support for the old babel-plugin-react-compiler setup that requires runtimeModule has been removed; use a newer compiler version that supports target.

    5.0.0release notes

Deprecations 1

  • The package is deprecated because its Oxc React refresh transform behavior is now provided by this plugin.

    5.0.0release notes

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.

    5.1.0release notes

Behavior and default changes 1

  • For NODE_ENV=development builds, the plugin uses the development JSX transform rather than the production JSX transform.

    5.0.0release notes

Tooling 2

  • The plugin is compatible with Vite 8, which is added to its peerDependencies range.

    5.2.0release notes

  • When used with rolldown-vite, the plugin now uses Oxc for the React refresh transform.

    5.0.0release notes

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.

    5.1.4release notes

  • The plugin now uses the transform.jsx option to support raw Rolldown 1.0.0-beta.44+, which removed the top-level jsx option.

    5.1.0release notes