-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
main.css doesn't contain all css file when using code splitting #3086
Comments
This should happen in a production build, just not development; can you confirm? Also, we need to know your |
@Timer Yes, this happened in production build which I care about. The size of the generated I use My |
Hmm, this sounds like a bug but I'm not sure; I'll dig into this tonight. |
/cc @gaearon is this the desired behavior? A bug with |
@Timer I viewed the config code
the reason seems that a item named the weback doc said that
should it be added and set true in the config by default ? or I should eject project and add it by myself? |
On production, everytime splitted chunk (component) is mounted, it will cause Flash of Unstyled component which really bad for UX. |
@Altiano Now I create a new git branch, then eject project and add |
See #2415; we're ok with setting |
It is Probably deserve to be openned on another issue, I think it is really related and We all will face this problem eventually when using code splitting But I wonder how you @yqz0203 solve common module on child chunks using |
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. |
- [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. |
It seems that the css files are packaged into js chunk file,and generating a link url after chunk loaded.
Is there a way to put all css into main.css when using code splitting?
Thanks. :-)
The text was updated successfully, but these errors were encountered: