-
-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flash of unstyled content on load #107
Comments
You can use the |
Cool, that's exactly what I just did. :) Just making sure there wasn't another way to pull this off. Thanks for the quick reply! |
i was curious to see if i could get it to work without using the ExtractTextPlugin.. first in the html or within some css that's not imported into a JS file add something like the following..
then inside the JS file that renders the app.. (it's a bit hacky but it works)
i don't know why it needs to wait 2 cycles of the event loop, 0 or 1 isn't enough here but that seems to do it update: i noticed on Firefox just 1 timeout works, Chrome needs 2 |
That flash is caused by the delay of loading the blob created on the fly to support source maps. Either disable sourcemaps for your css or add the |
Since this loader stores styles in JavaScript and then uses JavaScript to inject the styles onto the page, there is a flash of unstyled content on page load. The styles aren't actually applied until the JavaScript is parsed and the styles are injected into the head.
This issue strikes me as inherent in the design, but is there a workaround for this?
To see this issue, use Chrome.
The text was updated successfully, but these errors were encountered: