Skip to content

fix: support side-effect-free star reexport passthrough - #15420

Open
LingyuCoder wants to merge 2 commits into
mainfrom
seal/esm-reexport-passthrough
Open

fix: support side-effect-free star reexport passthrough#15420
LingyuCoder wants to merge 2 commits into
mainfrom
seal/esm-reexport-passthrough

Conversation

@LingyuCoder

@LingyuCoder LingyuCoder commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Port webpack's side-effect-free ESM star-reexport passthrough optimization and its follow-up correctness fixes.

Ported webpack PRs

  • webpack/webpack#21085 — skip side-effect-free export * passthrough modules, including nested namespace re-exports
  • webpack/webpack#21105 — port the comprehensive pure passthrough-chain regression coverage for named and namespace consumers, connection repointing, and unused intermediate barrels
  • webpack/webpack#21148 — preserve mixed and multi-star barrels as merge boundaries while still collapsing their single-star sub-chains
  • webpack/webpack#21149 — move every affected export target instead of a single target, cache single-star eligibility within each optimization pass, and port the fan-out regression case
  • webpack/webpack#21446 — keep import defer re-export barrels from being collapsed so deferred namespace identity and lazy evaluation semantics are preserved; port the defer-reexport-identity regression case with an additional evaluation-count assertion for Rspack

Rspack-specific details

  • represent pending export-target moves as none, one, or multiple targets
  • conservatively stop at named, default-bearing, namespace-bearing, mixed, and multi-star boundaries
  • apply the import defer guard to named re-exports, star target traversal, and regular import-specifier rewrites
  • cover both normal and runtime-mode config runners; fan-out is tested with and without module concatenation

Checklist

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

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing 12ffb64 to chore(deps): update rstack to v0.7.1 (#15416) by Jiahan Chen

❌ Size increased by 8.00KB from 68.31MB to 68.32MB (⬆️0.01%)

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

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

Found 5 projects in monorepo, 1 project with changes.

📊 Quick Summary
Project Total Size Gzip Size Change Gzip Change
popular-libs 1.7 MB 533.6 KB 📉 -69.3 KB (-3.9%) 📉 -23.0 KB (-4.1%)
react-10k 5.6 MB 1.3 MB 0 0
react-1k 823.1 KB 218.4 KB 0 0
react-5k 2.7 MB 669.3 KB 0 0
ui-components 4.9 MB 1.4 MB 0 0
📋 Detailed Reports (Click to expand)

📁 popular-libs

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

📌 Baseline Commit: a218b4ec52c71d07d48bc88f2626a24b1c466763 | PR: #15416

Metric Current Baseline Change
📊 Total Size 1.7 MB 1.7 MB -69.3 KB (-3.9%)
🗜️ Gzip Size 533.6 KB 556.5 KB -23.0 KB (-4.1%)
📄 JavaScript 1.7 MB 1.7 MB -69.3 KB (-3.9%)
🎨 CSS 0 B 0 B 0
🌐 HTML 289.0 B 289.0 B 0
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: popular-libs Bundle Diff

🤖 AI Degradation Analysis (Click to expand)

📊 Size Changes

Asset / Chunk Baseline Current Δ Size Δ % Initial?
No significant regressions detected 🎉

🔍 Root Cause Analysis

  • Total Bundle Reduced: JS initial size dropped 71,006 bytes (-3.9%) (1,821,577 → 1,750,571).
  • Mobx Upgrade: Replaced mobx@6.16.1 (57,945 bytes parsed) with mobx@7.0.3 (41,447 bytes parsed).
  • Devtools Optimization: @vue/devtools-kit@7.7.9 (46,815 bytes) replaced by @vue/devtools-kit@8.1.5 (33,416 bytes).

⚠️ Risk Assessment

Overall severity: Low

  • Initial chunk size decreased by 3.9%, positively impacting load performance with no size regressions.

💡 Optimization Suggestions

  1. Verify mobx@7 breaking changes in runtime behavior.
  2. Ensure @vue/devtools-kit remains excluded from production builds if intended for dev-only.
  3. Monitor nostics module growth (currently negligible at 4 bytes parsed).

Analysis by qwen3.5-plus

Generated by Rsdoctor GitHub Action

@codspeed-hq

codspeed-hq Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will regress 1 benchmark

⚡ 1 improved benchmark
❌ 1 regressed benchmark
✅ 48 untouched benchmarks
⏩ 47 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation rust@create_full_hash 2.3 ms 2.4 ms -2.12%
Simulation rust@create_chunk_hashes 1.8 ms 1.6 ms +11.47%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing seal/esm-reexport-passthrough (12ffb64) with main (a218b4e)2

Open in CodSpeed

Footnotes

  1. 47 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 (204355a) during the generation of this report, so a218b4e was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@LingyuCoder
LingyuCoder marked this pull request as ready for review September 1, 2026 10:56
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T11:35:21.048747Z 12ffb64 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant