-
-
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
fix: modules being in wrong chunks #17103
Conversation
|
For maintainers only:
|
Seems, like we have more changes than should, and some of changes are not looks good, need do more deep investigation... |
Yup it's a bit of a mess... Will clean up |
d603153
to
c24604b
Compare
okay i found the exact line causing the issue for me - i'm a bit unfamiliar with the code but i'm reading through it now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And it is intresing, because you should not have orphan
modules in chunks, can you debug locally and check what is module and it is
And can you provide list of plugins (maybe some of them do not allow webpack to drop them)? |
c24604b
to
76029ad
Compare
logged out everything for this condition ->
at first glance, it appears that everything from the shared libraries i have in my node_modules folder is being printed out (here is a snippet) ->
this goes on for many thousands of lines. as for files in my project (local looking at the stats, orphan modules seem to comprise most of my app ->
|
I'm going through plugins now and removing what I can, will see what effect this has... |
ugh oh no found the issue...
if the mode is production, the ModuleConcatenationPlugin is already applied, which makes the extra ModuleConcatenationPlugin redundant and causing all sorts of chaos... closing this out, thank you so much for the help here! |
Great, we found a problem, hope it will help other too 🎉 |
When building my project outlined in #17059 certain modules are being removed or added to the incorrect chunk (I am not 100% sure as of yet). Thees changes resolves the issue.
Summary
🤖 Generated by Copilot at d603153
Refactor and fix module concatenation plugin. Enhance the readability and correctness of the code in
lib/optimize/ModuleConcatenationPlugin.js
. Resolve a naming issue that could cause incorrect concatenation. Improve the error messages for unsupported or conflicting modules.Details
🤖 Generated by Copilot at d603153
getIncomingConnections
method and sorting modules by identifier (link)lib/optimize/ModuleConcatenationPlugin.js
(link)