Commit Graph
1 Commits
Author SHA1 Message Date
Afloat 439dae070e Keep module roles when dependency imports repeat (R3.12) (#1617)
A package with 52 reachable modules loses the final module's role when each hop repeats the same `require()` 2,000 times. The graph resolves those imports, but role propagation charges its 100,000-step limit for duplicate queue entries, eventually leaving reachable modules as `unknown`. Mark modules in the existing role map before enqueueing them. Repeated imports, cycles and shared dependencies then use one queue entry per newly discovered module. The limit remains 100,000 newly discovered modules per assignment, and the existing main/preload/renderer/page/worker precedence stays intact. Inline scripts continue to inherit their page's role.
2026-11-11 13:42:34 +07:00