From 5cf4e69cd3afc7f960e02072171c7c441747e8f0 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 30 Sep 2021 09:00:02 -0400 Subject: [PATCH] fix(plugin-react): respect `opts.fastRefresh` in viteBabel (#5139) --- packages/plugin-react/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-react/src/index.ts b/packages/plugin-react/src/index.ts index 8336400ea6a784..cd8870e94ff2f6 100644 --- a/packages/plugin-react/src/index.ts +++ b/packages/plugin-react/src/index.ts @@ -70,7 +70,7 @@ export default function viteReact(opts: Options = {}): PluginOption[] { resolve: projectRoot }) isProduction = config.isProduction - skipFastRefresh = isProduction || config.command === 'build' + skipFastRefresh ||= isProduction || config.command === 'build' const jsxInject = config.esbuild && config.esbuild.jsxInject if (jsxInject && importReactRE.test(jsxInject)) {