facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.71k stars 26.85k forks source link

[V4] Flash of unstyled content during Fast Refresh #9657

Open gaearon opened 4 years ago

gaearon commented 4 years ago

This doesn't repro every single time, but I occasionally see a flash of unstyled content after introducing and fixing a build error.

Here is a slowed down gif showing it:

ezgif-6-7993a8ca6221

Individual unstyled frames (this is in the default CRA template):

Screenshot 2020-09-17 at 02 04 34 Screenshot 2020-09-17 at 02 04 41

So it looks like we see unstyled app first (CSS getting applied too late?) and then we see a bizarre error overlay with terminal codes that then instantly disappears.

raix commented 2 years ago

This should be fixed in CRA v5 (we are using webpack error-overlay and this issue have been fixed in webpack-dev-server project)