Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/plugin-react-oxc/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default function viteReact(opts: Options = {}): Plugin[] {
jsxImportDevRuntime,
jsxImportRuntime,
],
rollupOptions: { jsx: { mode: 'automatic' } },
rollupOptions: { transform: { jsx: { runtime: 'automatic' } } },
},
}
},
Expand Down
4 changes: 3 additions & 1 deletion packages/plugin-react-swc/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ const react = (_options?: Options): Plugin[] => {
optimizeDeps: {
include: [`${options.jsxImportSource}/jsx-dev-runtime`],
...('rolldownVersion' in vite
? { rollupOptions: { jsx: { mode: 'automatic' } } }
? {
rollupOptions: { transform: { jsx: { runtime: 'automatic' } } },
}
: { esbuildOptions: { jsx: 'automatic' } }),
},
}),
Expand Down
4 changes: 3 additions & 1 deletion packages/plugin-react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ export default function viteReact(opts: Options = {}): Plugin[] {
jsxRefreshInclude: include,
jsxRefreshExclude: exclude,
},
optimizeDeps: { rollupOptions: { jsx: { mode: 'automatic' } } },
optimizeDeps: {
rollupOptions: { transform: { jsx: { runtime: 'automatic' } } },
},
}
}
}
Expand Down
Loading