Created by: n3tr
fix #9807
Changes
Fallback to the full reload if React version doesn't support Fast Refresh
- Overwrite
FAST_REFRESHtofalseif the current react version doesn't support (<16.9.0) - Remove Fast Refresh warning on the older react version since we will automatically fallback to do full reload.
- Change the minimum supported version to
16.9.0perreact-refresh-webpack-plugin's prerequisites.
Verify steps
Default setup
yarn create-react-app my-appyarn start- Modify
App.jscontent - The app gets updated through Fast Refresh
FAST_REFRESH=false
- Start the app by using
FAST_REFRESH=false yarn start - Modify
App.js - The app should do a full reload
React version that Fast Refresh is unavailable (e.g. 15)
- Change React version to
15.7.0yarn add react@15.7.0 react-dom@15.7.0- Remove
<React.StrictMode>fromindex.js
-
yarn startand - Modify
App.js - The app should do a full reload