Skip to content

Commit 5cf4e69

Browse files
authored
fix(plugin-react): respect opts.fastRefresh in viteBabel (#5139)
1 parent 7744749 commit 5cf4e69

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/plugin-react/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
7070
resolve: projectRoot
7171
})
7272
isProduction = config.isProduction
73-
skipFastRefresh = isProduction || config.command === 'build'
73+
skipFastRefresh ||= isProduction || config.command === 'build'
7474

7575
const jsxInject = config.esbuild && config.esbuild.jsxInject
7676
if (jsxInject && importReactRE.test(jsxInject)) {

0 commit comments

Comments
 (0)