Skip to content

Commit f2112d5

Browse files
committed
refactor: tweak the condition of delete plugin.transform
1 parent b1a31ae commit f2112d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/plugin-react/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
192192
if (
193193
canSkipBabel(staticBabelOptions.plugins, staticBabelOptions) &&
194194
skipFastRefresh &&
195-
isProduction
195+
(opts.jsxRuntime === 'classic' ? isProduction : true)
196196
) {
197197
delete viteBabel.transform
198198
}

0 commit comments

Comments
 (0)