Skip to content
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

Bundled scss: flash of unstyled content (FOUC) in chrome #37

Closed
learosema opened this issue Jan 29, 2016 · 2 comments
Closed

Bundled scss: flash of unstyled content (FOUC) in chrome #37

learosema opened this issue Jan 29, 2016 · 2 comments

Comments

@learosema
Copy link

When I try out the example app, I sometimes see a FOUC in Chrome: when the page loads, the components are rendered before the css is loaded. This causes the components to appear unstyled for a short moment. You may have to stroke F5 multiple times to see this effect.

I've only experienced this effect in Chrome, other browsers I tried (Firefox, Edge) do fine.

@coryhouse
Copy link
Owner

Yes, this is the nature of how Webpack works. Here's what's happening.

That said, you make a good point on the FOUC. To avoid it, Webpack's extractTextPlugin can generate a separate css file for the production build (run via npm run build).

To clarify, the build script doesn't currently do so, so I'll look into making that happen.

@coryhouse
Copy link
Owner

Just committed a change for this. Now generating a separate css for the prod build. Thanks for the heads up!

adamborowski pushed a commit to adamborowski/explorejs that referenced this issue Jun 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants