Skip to content

feat: expose dependencies to Rust succeedModule hooks - #15319

Draft
hardfist wants to merge 1 commit into
mainfrom
feat/succeed-module-dependency-request
Draft

feat: expose dependencies to Rust succeedModule hooks#15319
hardfist wants to merge 1 commit into
mainfrom
feat/succeed-module-dependency-request

Conversation

@hardfist

@hardfist hardfist commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Expose freshly built module dependencies to Rust CompilationSucceedModule hooks before factorization.

Adds invariant-preserving Rust setters for ESM import and re-export specifier dependencies, allowing external native plugins to reroute each specifier while keeping its resource identifier in sync. No JavaScript API is added.

Includes a custom-binding test plugin and config case that split import { A, B } from "pkg" into pkg/A and pkg/B while tree-shaking the original package entry.

Related links

Checklist

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

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing a1ba088 to refactor(cache): separate legacy cache implementation (#15316) by hardfist

❌ Size increased by 4.00KB from 67.99MB to 67.99MB (⬆️0.01%)

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Gzip Size Change Gzip Change
popular-libs 1.7 MB 556.5 KB 0 0
react-1k 823.1 KB 218.4 KB 0 0
react-10k 5.6 MB 1.3 MB 0 0
react-5k 2.7 MB 669.3 KB 0 0
ui-components 4.9 MB 1.4 MB 0 0

Generated by Rsdoctor GitHub Action

@codspeed-hq

codspeed-hq Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will regress 2 benchmarks

⚠️ 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

⚡ 1 improved benchmark
❌ 2 regressed benchmarks
✅ 47 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_chunk_assets 1.4 ms 1.5 ms -2.45%
Simulation rust@create_module_hashes 8.3 ms 8.5 ms -2.24%
Simulation rust@create_full_hash 2.8 ms 2.6 ms +7.95%

Tip

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


Comparing feat/succeed-module-dependency-request (a1ba088) with main (2a2f437)

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.

@hardfist
hardfist force-pushed the feat/succeed-module-dependency-request branch from 2b0ec54 to a1ba088 Compare August 24, 2026 11:21
@hardfist hardfist changed the title feat: allow rerouting ESM dependencies in succeedModule feat: expose dependencies to Rust succeedModule hooks Aug 24, 2026
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