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

Use ExtractTextPlugin as styleLoader for bootstrap-sass and font-awesome #423

Merged
merged 2 commits into from
Oct 24, 2015

Conversation

p-a
Copy link

@p-a p-a commented Oct 24, 2015

It seems that the integration of bootstrap-sass and font-awesome introduced some Flash Of Unstyled Content in the production build. Or rather no styling at all with javascript disabled.
Solution was to use the ExtractTextPlugin as style-loader for the loaders so that the final styling got appended to the main css file, rather than becoming a javascript rendered style tag.
Perhaps there exists better ways of having separate loader configurations for dev and prod, but this PR comes with two new files, allowing for more to things to be overridden if needed.
Works for me, but then I'm quite new to webpack :)

@erikras
Copy link
Owner

erikras commented Oct 24, 2015

@halt-hammerzeit, can you verify this?

@catamphetamine
Copy link
Contributor

Well, regarding Bootstrap and Font-Awesome: I didn't use any of them.
For production, it's obvious (he he, actually that's a pretty advanced topic) that ExtractTextPlugin must be used otherwise there would be a flash of unstyled content indeed.
I guess this PR nails a bug introduced by a contributor who didn't test his PR too thoroughly.

erikras added a commit that referenced this pull request Oct 24, 2015
Use ExtractTextPlugin as styleLoader for bootstrap-sass and font-awesome
@erikras erikras merged commit 96313f5 into erikras:master Oct 24, 2015
@erikras
Copy link
Owner

erikras commented Oct 24, 2015

Sounds like an endorsement to me. :-)

@catamphetamine
Copy link
Contributor

@erikras yeah, forgot to clarify that

@trueter
Copy link
Contributor

trueter commented Oct 24, 2015

I wasn't aware of this either. Thanks @p-a!

@p-a
Copy link
Author

p-a commented Oct 24, 2015

@trueter: I'm glad I could help!

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

Successfully merging this pull request may close these issues.

4 participants