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

⚠️ Note: The latest commit (071af69073) does not have baseline artifacts. Using commit 6c9c5aff71 for baseline comparison instead. If this seems incorrect, please wait a few minutes and try rerunning the workflow.

Found 6 projects in monorepo, 5 projects with changes.

📊 Quick Summary
Project Total Size Change
popular-libs 1.7 MB +2.2 KB (0.1%)
react-10k 5.7 MB +693.0 B (0.0%)
react-1k 826.9 KB +693.0 B (0.1%)
rome 984.1 KB 0
react-5k 2.7 MB +693.0 B (0.0%)
ui-components 5.0 MB +1.7 KB (0.0%)
📋 Detailed Reports (Click to expand)

📁 popular-libs

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

📌 Baseline Commit: 6c9c5aff71 | PR: #13400

Metric Current Baseline Change
📊 Total Size 1.7 MB 1.7 MB +2.2 KB (0.1%)
📄 JavaScript 1.7 MB 1.7 MB +2.2 KB (0.1%)
🎨 CSS 0 B 0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: popular-libs Bundle Diff

📁 react-10k

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

📌 Baseline Commit: 6c9c5aff71 | PR: #13400

Metric Current Baseline Change
📊 Total Size 5.7 MB 5.7 MB +693.0 B (0.0%)
📄 JavaScript 5.7 MB 5.7 MB +693.0 B (0.0%)
🎨 CSS 21.0 B 21.0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: react-10k Bundle Diff

📁 react-1k

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

📌 Baseline Commit: 6c9c5aff71 | PR: #13400

Metric Current Baseline Change
📊 Total Size 826.9 KB 826.2 KB +693.0 B (0.1%)
📄 JavaScript 826.9 KB 826.2 KB +693.0 B (0.1%)
🎨 CSS 0 B 0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: react-1k Bundle Diff

📁 react-5k

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

📌 Baseline Commit: 6c9c5aff71 | PR: #13400

Metric Current Baseline Change
📊 Total Size 2.7 MB 2.7 MB +693.0 B (0.0%)
📄 JavaScript 2.7 MB 2.7 MB +693.0 B (0.0%)
🎨 CSS 21.0 B 21.0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: react-5k Bundle Diff

📁 ui-components

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

📌 Baseline Commit: 6c9c5aff71 | PR: #13400

Metric Current Baseline Change
📊 Total Size 5.0 MB 4.9 MB +1.7 KB (0.0%)
📄 JavaScript 4.7 MB 4.7 MB +1.7 KB (0.0%)
🎨 CSS 291.6 KB 291.6 KB 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: ui-components Bundle Diff

Generated by Rsdoctor GitHub Action

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 8, 2026

Merging this PR will degrade performance by 2.43%

⚡ 1 improved benchmark
❌ 1 regressed benchmark
✅ 16 untouched benchmarks
🆕 1 new benchmark
⏩ 19 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
🆕 Simulation rust@scan_dependencies@three_module N/A 23.7 ms N/A
Simulation rust@create_chunk_ids 10.6 ms 10.8 ms -2.43%
Simulation rust@persistent_cache_restore@basic-react-development 26.7 ms 26.2 ms +1.87%

Comparing codex/configloader-real-esm (795f7fe) with main (5e2adb3)2

Open in CodSpeed

Footnotes

  1. 19 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 (6c9c5af) during the generation of this report, so 5e2adb3 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 795f7fe to chore(ci): add node 24 to release canary and debug workflows (#13656) by pshu

🎉 Size decreased by 6.84KB from 49.35MB to 49.34MB (⬇️0.01%)

@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
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