File tree Expand file tree Collapse file tree 4 files changed +19
-1
lines changed Expand file tree Collapse file tree 4 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 22
33## Unreleased
44
5+ ### Make compatible with rolldown-vite
6+
7+ This plugin is now compatible with rolldown-powered version of Vite.
8+
59## 3.9.0-beta.3 (2025-04-15)
610
711### Add ` reactRefreshHost ` option
Original file line number Diff line number Diff line change @@ -110,6 +110,8 @@ const react = (_options?: Options): PluginOption[] => {
110110 apply : 'serve' ,
111111 config : ( ) => ( {
112112 esbuild : false ,
113+ // NOTE: oxc option only exists in rolldown-vite
114+ oxc : false ,
113115 optimizeDeps : {
114116 include : [ `${ options . jsxImportSource } /jsx-dev-runtime` ] ,
115117 esbuildOptions : { jsx : 'automatic' } ,
Original file line number Diff line number Diff line change 22
33## Unreleased
44
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+
510## 4.4.0-beta.2 (2025-04-15)
611
712### Add ` reactRefreshHost ` option
Original file line number Diff line number Diff line change @@ -203,7 +203,14 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
203203 ] )
204204 }
205205
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+ ) {
207214 if ( ! isProduction ) {
208215 // These development plugins are only needed for the classic runtime.
209216 plugins . push (
You can’t perform that action at this time.
0 commit comments