-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
fix:that the external modules load without reload when lazy-compilation #19477
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
base: main
Are you sure you want to change the base?
Conversation
hooks = { | ||
createScript: new SyncWaterfallHook(["source", "chunk"]) | ||
createScript: new SyncWaterfallHook(["code", "chunk"]) |
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.
Please avoid unnecessary changes which is not related to fixes
lib/hmr/LazyCompilationPlugin.js
Outdated
} | ||
return false; | ||
}) | ||
: false; |
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.
Bad idea, we should register runtime inside ExternalModule
makeSerializable( | ||
ExternalModuleInitFragment, | ||
"webpack/lib/dependencies/ExternalModuleInitFragment" | ||
); |
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.
Why it was removed?
CodSpeed Performance ReportMerging #19477 will not alter performanceComparing Summary
|
fixes: #19134
Fixed issue with external dependencies not loading properly on first visit when lazy compilation is enabled
Added logic to ensure external dependencies are properly initialized before lazy-loaded chunks that depend on them
Enhanced the LazyCompilationProxyModule to detect and handle external dependencies
Added new runtime helper to ensure external dependencies are loaded in the correct order