-
-
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
CommonsChunkPlugin can break chunks when extracting entry modules #4795
Comments
@jbellenger Thank you so much for this report. 🙇 |
The globalize-webpack-plugin looks really hacky... Anyway this was caused by a webpack bug. #4815 fixes the bug. |
But how to extract common dependencies from async chunks now? |
@Alex-Sokolov see #4850 . You can work around this bug and #4850 by downgrading to webpack-2.4.1 and changing minChunks in your webpack config to:
|
@jbellenger Thanks for answer! Already downgraded to 2.4.1 where all works, but I think maybe there is a new way to do this in 2.5.1 :) |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
CommonsChunkPlugin can extract a chunks entryModule in a way that breaks the chunk.
Example: In this gist, chunk pageA.b287e3.js has entry module
./entry.js
, which is neither contained within the chunk nor automatically loaded by the webpack runtime.Trying to load chunk pageA.b287e3.js tenders this uncaught error:
If the current behavior is a bug, please provide the steps to reproduce.
Repro repo at https://github.com/jbellenger/CommonsChunkPlugin-async-testcase
Gist of build results at https://gist.github.com/jbellenger/f16429c8787969591e245d024c75db69
What is the expected behavior?
CommonsChunkPlugin should not modify chunks in ways that prevents them from loading. Either of these might fix the issue:
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
This is observed in webpack@2.4.1, node 6.9.5, on osx 10.11.6.
I originally reported this as globalize-webpack-plugin issue 44. After seeing different behavior using webpack@1, I suspect this is an issue with CommonsChunkPlugin in webpack@2
The text was updated successfully, but these errors were encountered: