-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
[Build Performance] chunk graph very much slow #8557
Comments
According to my test: the more dynamic import routes, the slower webpack build is. I think most of the huge spa with a lot of dynamic import routes would end up with long incremental build. I updated webpack from v2.7.0 to v4.28.2 recently. When i was using v2.7.0, same problem exists and it turns out I'm not the only one: Slow webpack build time (advanced module optimization). This post solved my problem, but as webpack updates, this plugin doesn't work anymore.
According to what this post says, this plugin cheat webpack to think there are no parents to optimize so recompilation time is quite low on development mode(mostly in advanced module optimization step). It seems hacky so I wonder if there is anything i can do to fix it? @sokra |
Problem solved. For anyone developing a huge app with a lot of async routes, you might need |
@chenyiqiao great what you can solve problem yourself! so we can close issue? |
The solution above seems like a workaround rather than a fix? |
@chenyiqiao how??? |
.babelrc
|
@chenyiqiao thanks ... |
What is the current behavior?
I am currently maintaining a SPA using webpack 4.28.2, with about 300 chunks(a lot of async chunks built with dynamic import). Now initial build takes ~80s. Incremental build takes ~30s, which is not acceptable. In both builds, chunk graph step takes ~20s, which is way too long. If i can figure out why chunk graph takes such long time, problem is basically solved for me.
Things I've tried:
Initial Build
~80s might be normal for a large SPA, But Several items unnormal:
Incremental Build
I just removed a word in a single file, expecting a 3~5s rebuild time, but it takes ~26s.
Several items unnormal:
My webpack config
let me know if more info needed.
The text was updated successfully, but these errors were encountered: