fix: should export named __webpack_require__ from runtime chunk#12045
Merged
LingyuCoder merged 1 commit intomainfrom Oct 30, 2025
Merged
fix: should export named __webpack_require__ from runtime chunk#12045LingyuCoder merged 1 commit intomainfrom
LingyuCoder merged 1 commit intomainfrom
Conversation
…depend on entries
✅ Deploy Preview for rspack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
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
Contributor
📦 Binary Size-limit
🙈 Size remains the same at 47.84MB |
CodSpeed Performance ReportMerging #12045 will not alter performanceComparing Summary
Footnotes |
stormslowly
approved these changes
Oct 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
port webpack/webpack#19768 from webpack
Related links
Checklist