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
runtimeChunk and splitChunk settings collide #7382
Comments
I'm interested in this problem because of how having multiple runtimes plays havoc with code that expects to only ever load and be evaluated once. Since the webpack runtime includes a locally-scoped Yeah, I know that in an ideal world, shared modules shouldn't exhibit such behaviour and should be idempotent. In reality, we've been able to register these as AMD modules and avoid multiple inclusions or evaluations of them. Only now when running the modules through webpack 4 are we experiencing this problem. |
Could you check if this is fixed in 4.9.1? |
Yep @sokra, I'm getting a single runtime in 4.9.1. Thanks for fixing this so quickly! |
Bug report
runtimeChunk: single
produces multiple runtime chunks if spitChunks minSize settings is very small.What is the current behavior?
settings
will basically ignore the
runtimeChunk: 'single'
setting and produce a runtime chunk per entry.If the current behavior is a bug, please provide the steps to reproduce.
see above
What is the expected behavior?
a single runtime chunk for all entries.
Other relevant information:
webpack version: latest
Node.js version: latest
Operating System: osx
Additional tools: -
basically, this behavior can be "fixed" by removing the module count check here: https://github.com/webpack/webpack/blob/master/lib/optimize/RuntimeChunkPlugin.js#L22
which causes the unwanted behavior. However, I do not know if there is a valid reason for that checks existance.
The text was updated successfully, but these errors were encountered: