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

Flashing of unstyled HTML in extract-text-webpack-plugin, reconsider setting allChunks: true? #2415

Closed
lawlmart opened this issue May 30, 2017 · 8 comments
Milestone

Comments

@lawlmart
Copy link

lawlmart commented May 30, 2017

Although setting allChunks: false in the configuration of extract-text-webpack-plugin increases the initial page load, it has the consequence of flashing unstyled HTML as the user moves between uncached chunks, since the page renders before addStyles can do its magic. So far it's been the only customization I need and I'd love to not have to eject.

This was originally discussed in #408 but the unstyled flashing wasn't mentioned which I feel is a dealbreaker. If this isn't up for continued debate than you can just close it.

@Timer
Copy link
Contributor

Timer commented Jun 6, 2017

We currently don't have the time to look into this, but I'll tag it for later review. Thanks!

@Timer Timer added this to the 100.0.0 milestone Jun 6, 2017
@gaearon
Copy link
Contributor

gaearon commented Jun 6, 2017

I didn't know this was a problem. Is this a known issue in webpack? Is it even possible to fix?

I'm okay with allChunks: true I guess.

@gaearon
Copy link
Contributor

gaearon commented Jun 22, 2017

Can you provide a project reproducing this?

@lawlmart
Copy link
Author

It sounds like this has been reproduced and the consensus is to set allChunks: true. I’d love to see this fixed soon, would you accept a PR?

@rt2zz
Copy link

rt2zz commented Dec 12, 2017

currently doing this via patch package. I feel this is an opinionated solve but not sure any practical alternatives exist? At the very least this is a big gotcha for code splitting with CRA

@mhluska
Copy link

mhluska commented Dec 16, 2017

What's the status on this one? I'm experiencing this issue as well. Edit: nevermind, this issue only exists for me in dev because of style-loader. In prod, ExtractTextPlugin fixes it.

@gaearon
Copy link
Contributor

gaearon commented Jan 8, 2018

I don't know. Is there a pull request from somebody affected that fixes it?

@andriijas andriijas mentioned this issue Feb 26, 2018
23 tasks
andriijas added a commit to andriijas/create-react-app that referenced this issue Mar 6, 2018
- [x] Use new webpack 4 development and production modes
- [x] Upgrade webpack dev server
- [x] webpack 4 compatible release of thread-loader
- [x] Upgrade to webpack 4 compatible release of HtmlWebpackPlugin
- [x] Beta release of ExtractTextPlugin compatible plugin
- [x] Pre-release of SwPrecacheWebpackPlugin compatible plugin
- [x] Pre-release of WebpackManifestPLugin compatible plugin
- [x] allChunks on ExtractTextPlugin
fixes facebook#3086 facebook#2415

prior discussion facebook#408

more details of this behavior webpack/webpack#673
- [x] Update README
- [x] Update WebpackDevServerUtils
- [x] Update InterpolateHtmlPlugin
- [x] Update ModuleScopePlugin
- [x] Update WatchMissingNodeModulesPlugin
- [x] Move UglifyJS options to webpack 4 optimize
- [x] vendor splitting via splitChunks.splitChunks (https://twitter.com/wSokra/status/969633336732905474)
- [x] long term caching via splitChunks.runtimeChunk (https://twitter.com/wSokra/status/969679223278505985)
- [x] Make sure process.env.NODE_ENV is proxied correctly to `react-error-overlay`
@bugzpodder
Copy link

Hey guys, this should be fixed with the mini-css-extract-plugin which we've added as part of webpack 4 in the next branch. I don't believe there will be any more releases for CRA 1.x. Please test the CRA2 release if possible, and open a new issue if you see something wrong.

@lock lock bot locked and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants