Skip to content

Releases: vitejs/vite-plugin-react

plugin-react@6.0.0-beta.0

03 Mar 06:52
plugin-react@6.0.0-beta.0
704e0d3

Choose a tag to compare

Pre-release

Remove Babel Related Features (#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:

 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:

 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)

Vite 7 and below are no longer supported. If you are using Vite 7, please upgrade to Vite 8.

plugin-rsc@0.5.21

26 Feb 00:37
db9221f

Choose a tag to compare

Please refer to CHANGELOG.md for details.

plugin-rsc@0.5.20

17 Feb 01:11
d11fda9

Choose a tag to compare

Please refer to CHANGELOG.md for details.

plugin-react@5.1.4

10 Feb 04:58
plugin-react@5.1.4
f066114

Choose a tag to compare

Fix canSkipBabel not accounting for babel.overrides (#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.

plugin-rsc@0.5.19

05 Feb 23:52
06a9d0a

Choose a tag to compare

Please refer to CHANGELOG.md for details.

plugin-rsc@0.5.18

03 Feb 08:01
5e0c982

Choose a tag to compare

Please refer to CHANGELOG.md for details.

plugin-react@5.1.3

02 Feb 10:23
plugin-react@5.1.3
cf0cb8a

Choose a tag to compare

plugin-react@5.1.3

plugin-react-swc@4.2.3

02 Feb 10:23
plugin-react-swc@4.2.3
12914fa

Choose a tag to compare

plugin-react-swc@4.2.3

plugin-rsc@0.5.17

27 Jan 00:17
46f1298

Choose a tag to compare

Please refer to CHANGELOG.md for details.

plugin-rsc@0.5.16

22 Jan 05:05
8d9648e

Choose a tag to compare

Please refer to CHANGELOG.md for details.