-
-
Couldn't load subscription status.
- Fork 730
test: should not panic for mf sharing asset modules #12003
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
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 a panic that occurs when Module Federation shares asset modules. The fix refactors the logic in AssetParserAndGenerator::get_types to properly handle source type determination when assets are shared between federated modules.
Key changes:
- Refactored conditional logic in
get_typesmethod to avoid panic scenarios - Added test case to verify asset modules work correctly with Module Federation sharing
- Fixed debug configuration path to use generic "node" instead of absolute path
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/rspack_plugin_asset/src/lib.rs | Refactored get_types method logic to eliminate panic conditions when handling shared asset modules |
| tests/rspack-test/configCases/assets/asset-shared-by-mf/test.js | Added test to verify asset imports work when shared via Module Federation |
| tests/rspack-test/configCases/assets/asset-shared-by-mf/rspack.config.js | Test configuration for Module Federation with shared assets |
| tests/rspack-test/configCases/assets/asset-shared-by-mf/index.js | Test entry point that dynamically imports the test module |
| scripts/debug/launch.mjs | Changed node program path from absolute to relative for portability |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📦 Binary Size-limit
🙈 Size remains the same at 47.85MB |
CodSpeed Performance ReportMerging #12003 will not alter performanceComparing Summary
|
ddb93f1 to
c39ad72
Compare
Summary
test coverage for #11861, which should be fixed by #11993
close #11861
Related links
Checklist