fix: inline enum module should populate its collected_typescript_info#12252
Merged
fix: inline enum module should populate its collected_typescript_info#12252
Conversation
✅ Deploy Preview for rspack canceled.
|
ahabhgk
approved these changes
Nov 20, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue where inline enum modules as concatenated module root modules don't properly populate their collected_typescript_info in the build info, ensuring that connection.is_target_active works correctly after concatenation.
Key Changes:
- Added logic to populate
collected_typescript_infofrom the root module when building concatenated modules - Added a comprehensive test case for enum modules in concatenated module roots
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
crates/rspack_core/src/concatenated_module.rs |
Added logic to copy collected_typescript_info from root module to concatenated module's build info before processing other modules |
tests/rspack-test/configCases/inline-enum/enum-module-in-concate-root/rspack.config.js |
Test configuration enabling inline enums, TypeScript info collection, and module concatenation |
tests/rspack-test/configCases/inline-enum/enum-module-in-concate-root/lib.ts |
TypeScript library file exporting an enum and a function for testing |
tests/rspack-test/configCases/inline-enum/enum-module-in-concate-root/index.js |
Test entry point verifying enum inlining behavior |
tests/rspack-test/configCases/inline-enum/enum-module-in-concate-root/module.js |
Additional test module importing from the library |
tests/rspack-test/configCases/inline-enum/enum-module-in-concate-root/foo.js |
Helper module used with different query parameters in imports |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tests/rspack-test/configCases/inline-enum/enum-module-in-concate-root/lib.ts
Show resolved
Hide resolved
Contributor
📦 Binary Size-limit
❌ Size increased by 640bytes from 47.62MB to 47.62MB (⬆️0.00%) |
CodSpeed Performance ReportMerging #12252 will not alter performanceComparing Summary
|
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
When inlined enum as concatenated module's root module, the concatenated module should keep the
collected_typescript_infoin build_info, to make sure the result ofconnection.is_target_activestays the same after concatenationRelated links
Checklist