# What changed in @vitejs/plugin-react

> 19 changes in @vitejs/plugin-react 5 to 6 from its official release notes, upgrade guides and advisories: 4 breaking, 1 deprecations, 4 new APIs and options. Each one cited. Sources checked 2026-10-17. HTML: https://unstale.sh/npm/@vitejs/plugin-react/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @vitejs/plugin-react 6

### Breaking changes

- 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.2) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.1.2)
- The plugin no longer provides Babel-related features, including the babel configuration option; use @rolldown/plugin-babel for Babel transforms. (6.0.0) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.0)
- Vite 7 and below are no longer supported; projects using Vite 7 should upgrade to Vite 8. (6.0.0) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.0)

### Deprecations

- The option is deprecated; use the builtin compiler.reportDiagnostics instead. (6.1.2) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.1.2)

### New APIs and options

- Recoverable React Compiler diagnostics are no longer logged by default; set this option to true to log them through Vite. (6.1.1) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.1.1)
- Enables experimental native React Compiler support when set to true; install oxc-transform-react to use it. (6.1.0) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.1.0)
- React compiler users can use this preset with @rolldown/plugin-babel for easier setup and a preconfigured filter to improve build performance. (6.0.0) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.0)

### Performance

- The filter is now linear, avoiding the performance regression caused by the non-linear filter in v6.0.3. (6.0.5) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.5)

### Tooling

- The peer dependency range now includes ^0.2.0, allowing projects using that version to satisfy the peer dependency. (6.0.1) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.1)

### Fixes and other changes

- 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.2) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.1.2)
- With the compiler enabled, TS files no longer trigger Fast Refresh, avoiding runtime errors. (6.1.2) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.1.2)
- The React Compiler transform now uses the environment sourcemap option instead of the top-level option when builder.sharedPlugins is enabled. (6.1.1) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.1.1)
- Fixed the `$RefreshSig$ is not defined` error when running `vite dev` with `NODE_ENV=production`. (6.0.4) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.4)
- The type now allows all options for reactCompilerPreset, rather than only compilationMode and target. (6.0.2) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.2)

## @vitejs/plugin-react 5

### Breaking changes

- The plugin now uses optimizeDeps.rolldownOptions to support newer rolldown-vite; update rolldown-vite if using an older version. (5.1.1) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.1.1)

### New APIs and options

- 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.0) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.1.0)

### Tooling

- The plugin is compatible with Vite 8, which is added to its peerDependencies range. (5.2.0) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.2.0)

### Fixes and other changes

- Babel is no longer incorrectly skipped when babel.overrides is configured without top-level plugins or presets, so override configurations are processed. (5.1.4) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.1.4)
- 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.0) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.1.0)
