Skip to content

Commit ecfdb76

Browse files
n3trianschmitz
authored andcommitted
fix: page doesn't get refreshed when FAST_REFRESH=false (facebook#9884)
Co-authored-by: Ian Schmitz <[email protected]>
1 parent 96713ac commit ecfdb76

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/react-dev-utils/webpackHotDevClient.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@ function tryApplyUpdates(onHotUpdateSuccess) {
243243
}
244244

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

0 commit comments

Comments
 (0)