Skip to content

Releases: vitejs/vite-plugin-react

[email protected]

27 Apr 03:32
ab01352

Choose a tag to compare

Please refer to CHANGELOG.md for details.

[email protected]

13 Apr 06:46
0389922

Choose a tag to compare

Please refer to CHANGELOG.md for details.

[email protected]

08 Apr 23:56
5a9ea3d

Choose a tag to compare

Please refer to CHANGELOG.md for details.

[email protected]

06 Apr 08:01
2a528de

Choose a tag to compare

Please refer to CHANGELOG.md for details.

[email protected]

13 Mar 10:43
[email protected]
1e94c06

Choose a tag to compare

Expand @rolldown/plugin-babel peer dep range (#1146)

Expanded @rolldown/plugin-babel peer dep range to include ^0.2.0.

[email protected]

12 Mar 14:38
[email protected]
dcc9012

Choose a tag to compare

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.

[email protected]

12 Mar 14:27
[email protected]
fda3a86

Choose a tag to compare

Add Vite 8 to peerDependencies range #1143

This plugin is compatible with Vite 8.

[email protected]

12 Mar 14:31
[email protected]
1b091b3

Choose a tag to compare

Add Vite 8 to peerDependencies range #1142

This plugin is compatible with Vite 8.

[email protected]

03 Mar 06:52
[email protected]
704e0d3

Choose a tag to compare

[email protected] Pre-release
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.

[email protected]

26 Feb 00:37
db9221f

Choose a tag to compare

Please refer to CHANGELOG.md for details.