fix: should increase the counter of sized in mangle exports plugin#12044
Merged
LingyuCoder merged 1 commit intomainfrom Oct 31, 2025
Merged
fix: should increase the counter of sized in mangle exports plugin#12044LingyuCoder merged 1 commit intomainfrom
LingyuCoder merged 1 commit intomainfrom
Conversation
✅ 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 pull request enables previously skipped tests by fixing underlying issues and adjusting test expectations. The main change is a critical bug fix in the mangle exports plugin that corrects the counter increment position to prevent incorrect name generation.
- Fixes a bug in the mangle exports plugin where the counter was incremented after the collision check instead of before
- Enables 13 previously disabled tests by removing their test filter files
- Updates test configurations and expectations to match actual rspack behavior differences from webpack
Reviewed Changes
Copilot reviewed 25 out of 26 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/rspack_plugin_javascript/src/plugin/mangle_exports_plugin.rs | Fixes counter increment position in export name generation loop |
| tests/rspack-test/configCases/mangle/mangle-with-object-prop/test.filter.js | Removes test skip - test now passes |
| tests/rspack-test/configCases/mangle/mangle-with-object-prop/test.config.js | Formats array return for better readability |
| tests/rspack-test/configCases/mangle/mangle-with-object-prop/rspack.config.js | Adds inlineConst: false to prevent constant inlining affecting mangle tests |
| tests/rspack-test/configCases/mangle/mangle-with-object-prop/index.js | Comments out CJS mangle tests pending future support |
| tests/rspack-test/configCases/loaders/options/test.filter.js | Removes test skip - loader validation now works |
| tests/rspack-test/configCases/loaders/options/errors.js | Comments out loader validation expectations pending schema support |
| tests/rspack-test/configCases/loaders/import-attributes-and-reexport/test.filter.js | Removes test skip - reexport behavior now correct |
| tests/rspack-test/configCases/loaders/hash-in-context/test.filter.js | Changes FIXME to TODO for unimplemented feature |
| tests/rspack-test/configCases/loaders-and-plugins-falsy/basic/test.filter.js | Removes test skip - validation now passes |
| tests/rspack-test/configCases/library/module-reexport-external/test.filter.js | Enables test by returning true |
| tests/rspack-test/configCases/library/module-reexport-external/rspack.config.js | Updates assertion to match rspack's different export format |
| tests/rspack-test/configCases/library/modern-module-reexport-type/test.filter.js | Removes test skip - timeout issue resolved |
| tests/rspack-test/configCases/json/bailout-flag-dep-export-perf/test.filter.js | Removes test skip - JSON parser support now available |
| tests/rspack-test/configCases/issues/issue-7563/test.filter.js | Removes test skip - hash length support now available |
| tests/rspack-test/configCases/inner-graph/issue-12669/test.filter.js | Removes test skip - exports now correct |
| tests/rspack-test/configCases/inner-graph/issue-12669/rspack.config.js | Comments out missing exports and adds TODO comment |
| tests/rspack-test/configCases/inner-graph/issue-12669/module.js | Reformats indentation for consistency |
| tests/rspack-test/configCases/errors/multi-entry-missing-module/test.config.js | Updates comment to clarify webpack/rspack difference |
| tests/rspack-test/configCases/errors/generator-generate-error/test.filter.js | Enables test by returning true |
| tests/rspack-test/configCases/errors/generator-generate-error/index.js | Updates assertion to match rspack's asset handling |
| tests/rspack-test/configCases/errors/case-emit/test.filter.js | Changes FIXME to TODO for unimplemented feature |
| tests/rspack-test/configCases/errors/asset-options-validation/test.filter.js | Changes FIXME to TODO for unimplemented feature |
| tests/rspack-test/configCases/entry/weird-names2/test.filter.js | Changes FIXME to TODO with typo in "wired" |
| tests/rspack-test/configCases/entry/weird-names/test.filter.js | Changes FIXME to TODO with typo in "wired" |
| tests/rspack-test/configCases/deprecations/config/test.filter.js | Removes test skip - deprecation now working |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
📦 Binary Size-limit
🙈 Size remains the same at 47.84MB |
CodSpeed Performance ReportMerging #12044 will not alter performanceComparing Summary
Footnotes |
JSerFeng
approved these changes
Oct 31, 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
Fix bug of 'mangleExports: size'. The counter did not increase when the name of export info is accepted, that make every mangled name the same.
Related links
Checklist