Skip to content

Commit

Permalink
fix: page doesn't get refreshed when FAST_REFRESH=false (facebook#9884)
Browse files Browse the repository at this point in the history
Co-authored-by: Ian Schmitz <ianschmitz@gmail.com>
  • Loading branch information
2 people authored and abhiisheek committed May 24, 2023
1 parent 949043d commit 4d9ba3d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react-dev-utils/webpackHotDevClient.js
Expand Up @@ -243,7 +243,8 @@ function tryApplyUpdates(onHotUpdateSuccess) {
}

function handleApplyUpdates(err, updatedModules) {
const hasReactRefresh = process.env.FAST_REFRESH !== 'false';
// NOTE: This var is injected by Webpack's DefinePlugin, and is a boolean instead of string.
const hasReactRefresh = process.env.FAST_REFRESH;
const wantsForcedReload = err || !updatedModules || hadRuntimeError;
// React refresh can handle hot-reloading over errors.
if (!hasReactRefresh && wantsForcedReload) {
Expand Down

0 comments on commit 4d9ba3d

Please sign in to comment.