Skip to content

Commit

Permalink
fix(plugin-react): respect opts.fastRefresh in viteBabel (#5139)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanVS committed Sep 30, 2021
1 parent 7744749 commit 5cf4e69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugin-react/src/index.ts
Expand Up @@ -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)) {
Expand Down

0 comments on commit 5cf4e69

Please sign in to comment.