Skip to content

fix: inline enum module should populate its collected_typescript_info#12252

Merged
JSerFeng merged 1 commit intomainfrom
fix/inline-enum-in-concate-root
Nov 20, 2025
Merged

fix: inline enum module should populate its collected_typescript_info#12252
JSerFeng merged 1 commit intomainfrom
fix/inline-enum-in-concate-root

Conversation

@JSerFeng
Copy link
Contributor

@JSerFeng JSerFeng commented Nov 20, 2025

Summary

When inlined enum as concatenated module's root module, the concatenated module should keep the collected_typescript_info in build_info, to make sure the result of connection.is_target_active stays the same after concatenation

Related links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings November 20, 2025 09:04
@netlify
Copy link

netlify bot commented Nov 20, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 24e4418
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/691ed9891456fa000877a3de

@JSerFeng JSerFeng enabled auto-merge (squash) November 20, 2025 09:05
@github-actions github-actions bot added release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack. labels Nov 20, 2025
Copy link
Contributor

Copilot AI left a 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 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_info from 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.

@github-actions
Copy link
Contributor

📦 Binary Size-limit

Comparing 24e4418 to refactor: rename webpack external vars to rspack format (#12249) by neverland

❌ Size increased by 640bytes from 47.62MB to 47.62MB (⬆️0.00%)

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 20, 2025

CodSpeed Performance Report

Merging #12252 will not alter performance

Comparing fix/inline-enum-in-concate-root (24e4418) with main (d8cd46f)

Summary

✅ 17 untouched

@JSerFeng JSerFeng merged commit 8913728 into main Nov 20, 2025
56 checks passed
@JSerFeng JSerFeng deleted the fix/inline-enum-in-concate-root branch November 20, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants