Open
Description
Hi,
Recently upgraded to CRA 4 and it's great so far. Well, almost great. While the new fast refresh works great on our landing pages, it does not work on our core app. The issue is that our core app relies heavily on events and js canvas, and that's where fast refresh does not work well, or at all.
Is there a way to optionally disable the fast refresh and fallback to browser reload on file save/update? I tried adding FAST_REFRESH=false
env but it did not work.
Thanks in advance.
Activity
petetnt commentedon Nov 17, 2020
Hi @hoomanaskari, setting
FAST_REFRESH=false
should work, eg. by runningFAST_REFRESH=false npm start
.Can you provide a repro repo or similar demo? Thanks!
hoomanaskari commentedon Nov 17, 2020
@petetnt Thanks for the reply. Yes, I can confirm that adding
FAST_REFRESH=false
to npm command does disable it, for some reason it did not work when I added it to my .env file.But the issue now is that it disables the whole thing, prior to this update, browser reloaded upon file save, but now it's either fast refresh or nothing. I was wondering if there is a way to optionally fallback to the previous system (browser reloading on file save)?
Guria commentedon Nov 17, 2020
@petetnt it might disable FAST REFRESH feature but it doesn't return browser reload on changes behaviour.
obsius commentedon Nov 17, 2020
#9884 fixed this three weeks ago. Not sure why the delay to push this fix and others.
threepointone commentedon Nov 19, 2020
This will likely be pushed out in the next release.
stale commentedon Dec 25, 2020
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
hoomanaskari commentedon Feb 2, 2021
This issue is not yet fixed in the latest version of react-script. Still browser does not refresh automatically when
FAST_REFRESH=false
.mlarcher commentedon Feb 9, 2021
We're using react-script 4.0.1 and using
FAST_REFRESH=false react-scripts start
gives us the expected (previous) behavior of page reload on changehoomanaskari commentedon Feb 10, 2021
Yes that is right, removing the node_modules, upgrading to react-scripts 4.0.2 and re-installing the node modules somehow resolved it for me too!
bdenhollander commentedon Feb 10, 2021
On Windows with react-scripts 4.0.1, setting
FAST_REFRESH=false
in a .env file works when launchingyarn start
from Powershell but not from Command Prompt.jaryway commentedon Aug 24, 2021
react 17.0.2
react-scripts 4.0.3
not wokring for me.
snippetkid commentedon Jan 9, 2022
react 17.0.2
react-scripts 4.0.2
FAST_REFRESH=false react-scripts start
works only for JS file updates. On CSS updates, fast refresh happens and my whole site freezes.isometriq commentedon Feb 12, 2022
Could it be possible to disable by default this experimental feature?
Only activated by devs when
FAST_REFRESH
is really desired and useful..