unstale

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

@unstale/cli 0.2.8 on npm

@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.

    4.2.2release notes

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

    4.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 without manually calling transformIndexHtml.

    4.2.0release notes

Tooling 1

  • The plugin is compatible with Vite 8, which is now included in its peer dependency range.

    4.3.0release notes

Fixes and other changes 4

  • Non-JSX files are no longer wrapped with React Refresh, fixing the behavior reported in #1225.

    4.3.2release notes

  • Avoids esbuild warnings when using Vite 8.

    4.3.1release notes

  • Fixes @vitejs/plugin-react-swc/preamble on build.

    4.2.1release notes

  • The plugin now uses SWC when this option is provided, even if plugins are not provided.

    4.2.0release notes