Skip to content

fix(cli): rspack-cli register loader to preserve real ESM TypeScript configs#13652

Draft
hardfist wants to merge 4 commits intomainfrom
codex/configloader-real-esm
Draft

fix(cli): rspack-cli register loader to preserve real ESM TypeScript configs#13652
hardfist wants to merge 4 commits intomainfrom
codex/configloader-real-esm

Conversation

@hardfist
Copy link
Copy Markdown
Contributor

@hardfist hardfist commented Apr 8, 2026

##Summary

  • limit configLoader=register TypeScript transpilation to files Node resolves as CommonJS
  • keep real ESM .ts helpers on Node's native loader path so faux ESM no longer gets downleveled to CommonJS
  • add config loader coverage for CJS configs requiring real ESM and faux ESM TypeScript helpers in cjs_in_esm

##Testing

  • Not run (not requested)

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Apr 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Rsdoctor Bundle Diff Analysis

Found 6 projects in monorepo, 6 projects with changes.

📊 Quick Summary
Project Total Size Change
popular-libs 1.7 MB -
react-10k 5.7 MB -
react-1k 826.2 KB -
react-5k 2.7 MB -
rome 984.1 KB -
ui-components 5.0 MB -
📋 Detailed Reports (Click to expand)

📁 popular-libs

Path: ../build-tools-performance/cases/popular-libs/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 1.7 MB - -
📄 JavaScript 1.7 MB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 react-10k

Path: ../build-tools-performance/cases/react-10k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 5.7 MB - -
📄 JavaScript 5.7 MB - -
🎨 CSS 21.0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 react-1k

Path: ../build-tools-performance/cases/react-1k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 826.2 KB - -
📄 JavaScript 826.2 KB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 react-5k

Path: ../build-tools-performance/cases/react-5k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 2.7 MB - -
📄 JavaScript 2.7 MB - -
🎨 CSS 21.0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 rome

Path: ../build-tools-performance/cases/rome/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 984.1 KB - -
📄 JavaScript 984.1 KB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 ui-components

Path: ../build-tools-performance/cases/ui-components/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 5.0 MB - -
📄 JavaScript 4.7 MB - -
🎨 CSS 291.6 KB - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

Generated by Rsdoctor GitHub Action

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 8, 2026

Merging this PR will improve performance by 5.13%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 2 improved benchmarks
✅ 26 untouched benchmarks
⏩ 10 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation rust@concatenate_module_code_generation 138.6 ms 137.2 ms +1.06%
Simulation js@Traverse compilation.modules 61.9 µs 58.9 µs +5.13%

Comparing codex/configloader-real-esm (0795216) with main (5f6b5b2)2

Open in CodSpeed

Footnotes

  1. 10 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (6f24f88) during the generation of this report, so 5f6b5b2 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

📦 Binary Size-limit

Comparing 0795216 to chore(deps): update dependency jest-diff to ^30.3.0 (#13684) by renovate[bot]

🎉 Size decreased by 9.72KB from 49.37MB to 49.36MB (⬇️0.02%)

@hardfist hardfist changed the title Fix rspack-cli register loader to preserve real ESM TypeScript configs fix(cli): rspack-cli register loader to preserve real ESM TypeScript configs Apr 9, 2026
@github-actions github-actions bot added the release: bug fix release: bug related release(mr only) label Apr 9, 2026
@hardfist hardfist force-pushed the codex/configloader-real-esm branch from 795f7fe to 0795216 Compare April 13, 2026 02:07
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.

1 participant