-
-
Notifications
You must be signed in to change notification settings - Fork 787
fix: should process runtime chunk after normal chunks of same chunk group #11778
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
✅ Deploy Preview for rspack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Pull Request Overview
This PR fixes the processing order of runtime chunks in the SRI (Subresource Integrity) plugin to ensure runtime chunks are processed after normal chunks within the same chunk group. The change aims to resolve issue #11082 by modifying the chunk processing logic.
- Simplified module detection logic by removing module federation-specific checks
- Changed chunk processing order to separate and prioritize runtime chunks appropriately
- Removed unnecessary dependency on rspack_plugin_mf module
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
crates/rspack_plugin_sri/src/runtime.rs | Simplified module detection and removed module federation imports |
crates/rspack_plugin_sri/src/asset.rs | Modified chunk processing to separate runtime chunks from normal chunks |
crates/rspack_plugin_sri/Cargo.toml | Removed unused rspack_plugin_mf dependency |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
📦 Binary Size-limit
❌ Size increased by 640bytes from 47.89MB to 47.89MB (⬆️0.00%) |
CodSpeed Performance ReportMerging #11778 will not alter performanceComparing Summary
Footnotes |
Summary
try to fix #11082
We group chunks based on the parent-child relationship of chunk groups, so as to process the chunks in the child chunk group first and then those in the parent chunk group, thereby preventing to build the relation graph of chunks.
However, in the runtime chunk, it depends on other chunks in the same chunk group. This means that if it is processed first, the placeholders of normal chunks inside it will not be replaced. Therefore, runtime chunks need to be separated into another batch and processed after all the normal chunks in the same chunk group have been processed.
Related links
Checklist