-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Comments
We currently don't have the time to look into this, but I'll tag it for later review. Thanks! |
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. |
Can you provide a project reproducing this? |
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? |
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 |
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. |
I don't know. Is there a pull request from somebody affected that fixes it? |
- [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`
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. |
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.
The text was updated successfully, but these errors were encountered: