npm / @vitejs/plugin-react-swc
@vitejs/plugin-react-swc
What changed in @vitejs/plugin-react-swc 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-27.
2 breaking1 new APIs and options1 tooling4 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@vitejs/plugin-react-swc 48 changes
Breaking changes 2
The plugin now uses optimizeDeps.rolldownOptions to support newer rolldown-vite; update rolldown-vite if using an older version.
The plugin now requires Node 20.19+ or 22.12+.
New APIs and options 1
SSR applications can import this virtual module at the top of their client entry to initialize the HMR runtime without manually calling transformIndexHtml.
Tooling 1
The plugin is compatible with Vite 8, which is now included in its peer dependency range.
Fixes and other changes 4
Non-JSX files are no longer wrapped with React Refresh, fixing the behavior reported in #1225.
Avoids esbuild warnings when using Vite 8.
Fixes @vitejs/plugin-react-swc/preamble on build.
The plugin now uses SWC when this option is provided, even if plugins are not provided.