-
-
Notifications
You must be signed in to change notification settings - Fork 746
fix: should export named __webpack_require__ from runtime chunk #12045
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
…depend on entries
✅ 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 an issue where __webpack_require__.C (EXTERNAL_INSTALL_CHUNK) was not functioning correctly in module chunk format with dependOn entries. The fix changes the export strategy for __webpack_require__ from a default export to a named export.
- Changed
__webpack_require__export from default to named export using a temporary variable - Updated import statements to use named imports instead of default imports
- Removed conditional logic that prevented runtime module addition for entry chunks
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/rspack-test/configCases/module/dependOn-entries/test.filter.js | Re-enabled previously disabled test that was failing with __webpack_require__.C error |
| crates/rspack_plugin_runtime/src/runtime_module/export_webpack_require.rs | Changed export from default to named export with temporary variable |
| crates/rspack_plugin_runtime/src/module_chunk_loading.rs | Removed entry module count check that prevented runtime module addition |
| crates/rspack_plugin_runtime/src/module_chunk_format.rs | Updated import to use named import syntax and added formatting whitespace |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
crates/rspack_plugin_runtime/src/runtime_module/export_webpack_require.rs
Show resolved
Hide resolved
crates/rspack_plugin_runtime/src/runtime_module/export_webpack_require.rs
Show resolved
Hide resolved
📦 Binary Size-limit
🙈 Size remains the same at 47.84MB |
CodSpeed Performance ReportMerging #12045 will not alter performanceComparing Summary
Footnotes |
Summary
port webpack/webpack#19768 from webpack
Related links
Checklist