Created by: n3tr
fix #9807
Changes
Fallback to the full reload if React version doesn't support Fast Refresh
- Overwrite
FAST_REFRESH
tofalse
if 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.0
perreact-refresh-webpack-plugin
's prerequisites.
Verify steps
Default setup
yarn create-react-app my-app
yarn start
- Modify
App.js
content - 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.0
yarn add react@15.7.0 react-dom@15.7.0
- Remove
<React.StrictMode>
fromindex.js
-
yarn start
and - Modify
App.js
- The app should do a full reload