refactor: export lexical runtime globals for esm chunks#14741
refactor: export lexical runtime globals for esm chunks#14741LingyuCoder wants to merge 6 commits into
Conversation
📦 Binary Size-limit
❌ Size increased by 73.63KB from 66.55MB to 66.63MB (⬆️0.11%) |
Rsdoctor Bundle Diff AnalysisFound 5 projects in monorepo, 5 projects with changes. 📊 Quick Summary
📋 Detailed Reports (Click to expand)📁 popular-libsPath:
📁 react-10kPath:
📁 react-5kPath:
📁 react-1kPath:
📁 ui-componentsPath:
Generated by Rsdoctor GitHub Action |
aa258ea to
0af5acb
Compare
2dbde1d to
40f063b
Compare
Merging this PR will improve performance by 2.22%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | rust@create_module_hashes |
8.5 ms | 8.3 ms | +2.22% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing seal/stacked-lexical-runtime-globals (bf0ef18) with main (27ff319)
Footnotes
-
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. ↩
40f063b to
afc24cb
Compare
Summary
__rspack_*bindings from the runtime chunk instead of mounting them on__rspack_context__rspack_set_*Context
This is stacked on #14740. The base PR only enables the RuntimeModeEsmOutput context import coverage and fixes modern ESM chunk loading. This PR contains the lexical runtime-global export/import behavior needed for tree shaking when downstream consumers depend on the ESM output runtime chunk.
The behavior is scoped to output module builds using Rspack runtime mode with a split modern-module runtime chunk.
Checks
pnpm run build:binding:devpnpm run test:unit