# @vitejs/plugin-react changelog > The official React plugin for Vite, using Babel for Fast Refresh and the React Compiler. - Vendor: Vite - Category: Developer Tools - Official site: https://github.com/vitejs/vite-plugin-react - Tracked by: What's New (https://whatsnew.fyi/product/vite-plugin-react) - Harvested from: GitHub (vitejs/vite-plugin-react) - Entries below: 22 (newest first) What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. ## Releases ### 6.0.5 - Date: 2026-07-30 - Version: 6.0.5 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.5 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/6.0.5 - **fixed** — React compiler preset filter to be linear to avoid performance regression ###### Fixed the react compiler preset filter to be linear ([#1353](https://github.com/vitejs/vite-plugin-react/pull/1353)) The improved filter in v6.0.3 was non-linear and caused a performance regression ([#1349](https://github.com/vitejs/vite-plugin-react/issues/1349)). The filter was changed to be linear to avoid that. ### 6.0.4 - Date: 2026-07-22 - Version: 6.0.4 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.4 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/6.0.4 - **fixed** — Fix $RefreshSig$ is not defined error when running vite dev with NODE_ENV=production ###### Fixed `$RefreshSig$ is not defined` error when running `vite dev` with `NODE_ENV=production` When running `vite dev` with `NODE_ENV=production`, the app errored with `$RefreshSig$ is not defined`. This error is now fixed. ### 6.0.3 - Date: 2026-06-23 - Version: 6.0.3 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.3 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/6.0.3 ### 6.0.2 - Date: 2026-05-14 - Version: 6.0.2 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.2 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/6.0.2 - **changed** — Allow all options in reactCompilerPreset instead of just compilationMode and target ###### Allow all options in reactCompilerPreset ([#1189](https://github.com/vitejs/vite-plugin-react/pull/1189)) This is a type only change. Only `compilationMode` and `target` options were available for `reactCompilerPreset`. ### 6.0.1 - Date: 2026-03-13 - Version: 6.0.1 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.1 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/6.0.1 ###### Expand `@rolldown/plugin-babel` peer dep range ([#1146](https://github.com/vitejs/vite-plugin-react/pull/1146)) Expanded `@rolldown/plugin-babel` peer dep range to include `^0.2.0`. ### 6.0.0 - Date: 2026-03-12 - Version: 6.0.0 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.0 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/6.0.0 ###### Remove Babel Related Features ([#1123](https://github.com/vitejs/vite-plugin-react/pull/1123)) Vite 8+ can handle React Refresh Transform by Oxc and doesn't need Babel for it. With that, there are no transform applied that requires Babel. To reduce the installation size of this plugin, babel is no longer a dependency of this plugin and the related features are removed. If you are using Babel, you can use `@rolldown/plugin-babel` together with this plugin: ```diff import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' +import babel from '@rolldown/plugin-babel' export default defineConfig({ plugins: [ - react({ - babel: { - plugins: ['@babel/plugin-proposal-throw-expressions'], - }, - }), + react(), + babel({ + plugins: ['@babel/plugin-proposal-throw-expressions'], + }), ] }) ``` For React compiler users, you can use `reactCompilerPreset` for easier setup with preconfigured filter to improve build performance: ```diff import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' +import react, { reactCompilerPreset } from '@vitejs/plugin-react' +import babel from '@rolldown/plugin-babel' export default defineConfig({ plugins: [ - react({ - babel: { - plugins: ['babel-plugin-react-compiler'], - }, - }), + react(), + babel({ + presets: [reactCompilerPreset()] + }), ] }) ``` ###### Drop Vite 7 and below support ([#1124](https://github.com/vitejs/vite-plugin-react/pull/1124)) Vite 7 and below are no longer supported. If you are using Vite 7, please upgrade to Vite 8. ### 5.2.0 - Date: 2026-03-12 - Version: 5.2.0 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.2.0 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/5.2.0 ###### Add Vite 8 to peerDependencies range [#1143](https://github.com/vitejs/vite-plugin-react/pull/1143) This plugin is compatible with Vite 8. ### 6.0.0-beta.0 - Date: 2026-03-03 - Version: 6.0.0-beta.0 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.0-beta.0 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/6.0.0-beta.0 - Labels: Pre-release ###### Remove Babel Related Features ([#1123](https://github.com/vitejs/vite-plugin-react/pull/1123)) Vite 8+ can handle React Refresh Transform by Oxc and doesn't need Babel for it. With that, there are no transform applied that requires Babel. To reduce the installation size of this plugin, babel is no longer a dependency of this plugin and the related features are removed. If you are using Babel, you can use `@rolldown/plugin-babel` together with this plugin: ```diff import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' +import babel from '@rolldown/plugin-babel' export default defineConfig({ plugins: [ - react({ - babel: { - plugins: ['@babel/plugin-proposal-throw-expressions'], - }, - }), + react(), + babel({ + plugins: ['@babel/plugin-proposal-throw-expressions'], + }), ] }) ``` For React compiler users, you can use `reactCompilerPreset` for easier setup with preconfigured filter to improve build performance: ```diff import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' +import react, { reactCompilerPreset } from '@vitejs/plugin-react' +import babel from '@rolldown/plugin-babel' export default defineConfig({ plugins: [ - react({ - babel: { - plugins: ['babel-plugin-react-compiler'], - }, - }), + react(), + babel({ + presets: [reactCompilerPreset()] + }), ] }) ``` ###### Drop Vite 7 and below support ([#1124](https://github.com/vitejs/vite-plugin-react/pull/1124)) Vite 7 and below are no longer supported. If you are using Vite 7, please upgrade to Vite 8. ### 5.1.4 - Date: 2026-02-10 - Version: 5.1.4 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.1.4 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/5.1.4 ###### Fix `canSkipBabel` not accounting for `babel.overrides` ([#1098](https://github.com/vitejs/vite-plugin-react/pull/1098)) When configuring `babel.overrides` without top-level plugins or presets, Babel was incorrectly skipped. The `canSkipBabel` function now checks for `overrides.length` to ensure override configurations are processed. ### 5.1.3 - Date: 2026-02-02 - Version: 5.1.3 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.1.3 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/5.1.3 ### 5.1.2 - Date: 2025-12-08 - Version: 5.1.2 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.1.2 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/5.1.2 ### 5.1.1 - Date: 2025-11-12 - Version: 5.1.1 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.1.1 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/5.1.1 ###### Update code to support newer `rolldown-vite` ([#976](https://github.com/vitejs/vite-plugin-react/pull/976)) `rolldown-vite` will remove `optimizeDeps.rollupOptions` in favor of `optimizeDeps.rolldownOptions` soon. This plugin now uses `optimizeDeps.rolldownOptions` to support newer `rolldown-vite`. Please update `rolldown-vite` to the latest version if you are using an older version. ### 5.1.0 - Date: 2025-10-24 - Version: 5.1.0 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.1.0 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/5.1.0 ###### Add `@vitejs/plugin-react/preamble` virtual module for SSR HMR ([#890](https://github.com/vitejs/vite-plugin-react/pull/890)) SSR applications can now initialize HMR runtime by importing `@vitejs/plugin-react/preamble` at the top of their client entry instead of manually calling `transformIndexHtml`. This simplifies SSR setup for applications that don't use the `transformIndexHtml` API. ###### Fix raw Rolldown support for Rolldown 1.0.0-beta.44+ ([#930](https://github.com/vitejs/vite-plugin-react/pull/930)) Rolldown 1.0.0-beta.44+ removed the top-level `jsx` option in favor of `transform.jsx`. This plugin now uses the `transform.jsx` option to support Rolldown 1.0.0-beta.44+. ### 5.0.4 - Date: 2025-09-27 - Version: 5.0.4 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.0.4 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/5.0.4 ###### Perf: use native refresh wrapper plugin in rolldown-vite ([#881](https://github.com/vitejs/vite-plugin-react/pull/881)) ### 5.0.3 - Date: 2025-09-17 - Version: 5.0.3 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.0.3 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/5.0.3 ###### HMR did not work for components imported with queries with rolldown-vite ([#872](https://github.com/vitejs/vite-plugin-react/pull/872)) ###### Perf: simplify refresh wrapper generation ([#835](https://github.com/vitejs/vite-plugin-react/pull/835)) ### 5.0.2 - Date: 2025-08-28 - Version: 5.0.2 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.0.2 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/5.0.2 ###### Skip transform hook completely in rolldown-vite in dev if possible ([#783](https://github.com/vitejs/vite-plugin-react/pull/783)) ### 5.0.1 - Date: 2025-08-19 - Version: 5.0.1 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.0.1 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/5.0.1 ###### Set `optimizeDeps.rollupOptions.transform.jsx` instead of `optimizeDeps.rollupOptions.jsx` for rolldown-vite ([#735](https://github.com/vitejs/vite-plugin-react/pull/735)) `optimizeDeps.rollupOptions.jsx` is going to be deprecated in favor of `optimizeDeps.rollupOptions.transform.jsx`. ###### Perf: skip `babel-plugin-react-compiler` if code has no `"use memo"` when `{ compilationMode: "annotation" }` ([#734](https://github.com/vitejs/vite-plugin-react/pull/734)) ###### Respect tsconfig `jsxImportSource` ([#726](https://github.com/vitejs/vite-plugin-react/pull/726)) ###### Fix `reactRefreshHost` option on rolldown-vite ([#716](https://github.com/vitejs/vite-plugin-react/pull/716)) ###### Fix `RefreshRuntime` being injected twice for class components on rolldown-vite ([#708](https://github.com/vitejs/vite-plugin-react/pull/708)) ###### Skip `babel-plugin-react-compiler` on non client environment ([689](https://github.com/vitejs/vite-plugin-react/pull/689)) ### 5.0.0 - Date: 2025-08-07 - Version: 5.0.0 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.0.0 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/5.0.0 (Same content as v5.0.0-beta.0 https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.0.0-beta.0) ###### Use Oxc for react refresh transform in rolldown-vite When used with rolldown-vite, this plugin now uses Oxc for react refresh transform. Since this behavior is what `@vitejs/plugin-react-oxc` did, `@vitejs/plugin-react-oxc` is now deprecated and the `disableOxcRecommendation` option is removed. Also, while `@vitejs/plugin-react-oxc` used the production JSX transform even for `NODE_ENV=development` build, `@vitejs/plugin-react` uses the development JSX transform for `NODE_ENV=development` build. ###### Allow processing files in `node_modules` The default value of `exclude` options is now `[/\/node_modules\//]` to allow processing files in `node_modules` directory. It was previously `[]` and files in `node_modules` was always excluded regardless of the value of `exclude` option. ###### `react` and `react-dom` is no longer added to [`resolve.dedupe`](https://vite.dev/config/#resolve-dedupe) automatically Adding values to `resolve.dedupe` forces Vite to resolve them differently from how Node.js does, which can be confusing and may not be expected. This plugin no longer adds `react` and `react-dom` to `resolve.dedupe` automatically. If you encounter errors after upgrading, check your package.json for version mismatches in `dependencies` or `devDependencies`, as well as your package manager’s configuration. If you prefer the previous behavior, you can manually add `react` and `react-dom` to `resolve.dedupe`. ###### Remove old `babel-plugin-react-compiler` support that requires `runtimeModule` option `runtimeModule` option is no longer needed in newer `babel-plugin-react-compiler` versions. Make sure to use a newer version of `babel-plugin-react-compiler` that supports `target` option. ###### Require Node 20.19+, 22.12+ This plugin now requires Node 20.19+ or 22.12+. ### 5.0.0-beta.0 - Date: 2025-07-28 - Version: 5.0.0-beta.0 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.0.0-beta.0 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/5.0.0-beta.0 - Labels: Pre-release ###### Use Oxc for react refresh transform in rolldown-vite When used with rolldown-vite, this plugin now uses Oxc for react refresh transform. Since this behavior is what `@vitejs/plugin-react-oxc` did, `@vitejs/plugin-react-oxc` is now deprecated and the `disableOxcRecommendation` option is removed. Also, while `@vitejs/plugin-react-oxc` used the production JSX transform even for `NODE_ENV=development` build, `@vitejs/plugin-react` uses the development JSX transform for `NODE_ENV=development` build. ###### Allow processing files in `node_modules` The default value of `exclude` options is now `[/\/node_modules\//]` to allow processing files in `node_modules` directory. It was previously `[]` and files in `node_modules` was always excluded regardless of the value of `exclude` option. ###### `react` and `react-dom` is no longer added to [`resolve.dedupe`](https://vite.dev/config/#resolve-dedupe) automatically Adding values to `resolve.dedupe` forces Vite to resolve them differently from how Node.js does, which can be confusing and may not be expected. This plugin no longer adds `react` and `react-dom` to `resolve.dedupe` automatically. If you encounter errors after upgrading, check your package.json for version mismatches in `dependencies` or `devDependencies`, as well as your package manager’s configuration. If you prefer the previous behavior, you can manually add `react` and `react-dom` to `resolve.dedupe`. ###### Remove old `babel-plugin-react-compiler` support that requires `runtimeModule` option `runtimeModule` option is no longer needed in newer `babel-plugin-react-compiler` versions. Make sure to use a newer version of `babel-plugin-react-compiler` that supports `target` option. ###### Require Node 20.19+, 22.12+ This plugin now requires Node 20.19+ or 22.12+. ### 4.7.0 - Date: 2025-07-18 - Version: 4.7.0 - Original notes: https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%404.7.0 - Permalink: https://whatsnew.fyi/product/vite-plugin-react/releases/4.7.0 ###### Add HMR support for compound components ([#518](https://github.com/vitejs/vite-plugin-react/pull/518)) HMR now works for compound components like this: ```tsx const Root = () =>