File tree 4 files changed +19
-1
lines changed
4 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Unreleased
4
4
5
+ ### Make compatible with rolldown-vite
6
+
7
+ This plugin is now compatible with rolldown-powered version of Vite.
8
+
5
9
## 3.9.0-beta.3 (2025-04-15)
6
10
7
11
### Add ` reactRefreshHost ` option
Original file line number Diff line number Diff line change @@ -110,6 +110,8 @@ const react = (_options?: Options): PluginOption[] => {
110
110
apply : 'serve' ,
111
111
config : ( ) => ( {
112
112
esbuild : false ,
113
+ // NOTE: oxc option only exists in rolldown-vite
114
+ oxc : false ,
113
115
optimizeDeps : {
114
116
include : [ `${ options . jsxImportSource } /jsx-dev-runtime` ] ,
115
117
esbuildOptions : { jsx : 'automatic' } ,
Original file line number Diff line number Diff line change 2
2
3
3
## Unreleased
4
4
5
+ ### Make compatible with rolldown-vite
6
+
7
+ This plugin is now compatible with rolldown-powered version of Vite.
8
+ Note that currently the ` __source ` property value position might be incorrect. This will be fixed in the near future.
9
+
5
10
## 4.4.0-beta.2 (2025-04-15)
6
11
7
12
### Add ` reactRefreshHost ` option
Original file line number Diff line number Diff line change @@ -203,7 +203,14 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
203
203
] )
204
204
}
205
205
206
- if ( opts . jsxRuntime === 'classic' && isJSX ) {
206
+ if (
207
+ opts . jsxRuntime === 'classic' &&
208
+ isJSX &&
209
+ // OXC injects self and source so these plugins are not needed for rolldown-vite
210
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
211
+ // @ts -ignore -- this.meta.rolldownVersion only exists in rolldown-vite
212
+ ! this . meta . rolldownVersion
213
+ ) {
207
214
if ( ! isProduction ) {
208
215
// These development plugins are only needed for the classic runtime.
209
216
plugins . push (
You can’t perform that action at this time.
0 commit comments