# What changed in @vitejs/plugin-react-swc

> 8 changes in @vitejs/plugin-react-swc 4 from its official release notes, upgrade guides and advisories: 2 breaking, 1 new APIs and options. Each one cited. Sources checked 2026-10-27. HTML: https://unstale.sh/npm/@vitejs/plugin-react-swc/

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

## @vitejs/plugin-react-swc 4

### Breaking changes

- The plugin now uses optimizeDeps.rolldownOptions to support newer rolldown-vite; update rolldown-vite if using an older version. (4.2.2) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react-swc%404.2.2)
- The plugin now requires Node 20.19+ or 22.12+. (4.0.0) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react-swc%404.0.0)

### New APIs and options

- SSR applications can import this virtual module at the top of their client entry to initialize the HMR runtime without manually calling transformIndexHtml. (4.2.0) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react-swc%404.2.0)

### Tooling

- The plugin is compatible with Vite 8, which is now included in its peer dependency range. (4.3.0) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react-swc%404.3.0)

### Fixes and other changes

- Non-JSX files are no longer wrapped with React Refresh, fixing the behavior reported in #1225. (4.3.2) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react-swc%404.3.2)
- Avoids esbuild warnings when using Vite 8. (4.3.1) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react-swc%404.3.1)
- Fixes @vitejs/plugin-react-swc/preamble on build. (4.2.1) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react-swc%404.2.1)
- The plugin now uses SWC when this option is provided, even if plugins are not provided. (4.2.0) — [release notes](https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react-swc%404.2.0)
