refactor: rename webpack default export var to rspack format#12257
Merged
chenjiahan merged 1 commit intomainfrom Nov 21, 2025
Merged
refactor: rename webpack default export var to rspack format#12257chenjiahan merged 1 commit intomainfrom
chenjiahan merged 1 commit intomainfrom
Conversation
✅ Deploy Preview for rspack canceled.
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the default export variable naming convention from webpack's __WEBPACK_DEFAULT_EXPORT__ to rspack's __rspack_default_export, aligning the codebase more closely with rspack branding and adopting a lowercase naming style.
Key changes:
- Updated core constant definitions in the Rust codebase to use the new naming convention
- Regenerated all test snapshots to reflect the new variable name in generated output
- Modified test code that validates or checks for the old variable name
Reviewed Changes
Copilot reviewed 127 out of 127 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
crates/rspack_core/src/utils/concatenation_scope.rs |
Updated DEFAULT_EXPORT_ATOM and DEFAULT_EXPORT constants to use __rspack_default_export |
crates/rspack_core/src/reserved_names.rs |
Updated reserved names array to include the new naming convention |
| Multiple test snapshot files | Regenerated snapshots showing the new default export variable name in generated code |
tests/rspack-test/configCases/parsing/harmony-export-comment/index.js |
Updated test assertion to check for new variable name |
tests/rspack-test/configCases/parsing/default-export-const/supports-const.js |
Updated error message expectation to match new variable name |
tests/rspack-test/statsAPICases/exports.js |
Updated hash expectations due to code generation changes |
tests/rspack-test/diagnosticsCases/module-parse-failed/concatenate_parse_module/stats.err |
Updated error output snapshot |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
📦 Binary Size-limit
🙈 Size remains the same at 47.63MB |
CodSpeed Performance ReportMerging #12257 will not alter performanceComparing Summary
|
LingyuCoder
approved these changes
Nov 21, 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
Update default export variable naming convention from
__WEBPACK_DEFAULT_EXPORT__to__rspack_default_export.See #12244 for more details.
Checklist