Minimal Rolldown-only reproduction for a lazy dev runtime MissingFactoryError
Minimal Rolldown-only reproduction for a MissingFactoryError in lazy dev
mode. It uses the experimental dev-engine and runtime APIs directly; Vite and a
browser are not involved.
pnpm install
pnpm repro
pnpm repro is expected to exit with code 1 and currently throws:
MissingFactoryError: No factory registered for module shared.js
main.js
├── import('./lazy-a.js') ──┐
└── import('./lazy-b.js') ──┴── shared.js
Both lazy entries statically import the same shared.js module.
notifyPayloadDelivered(first.filename).DevRuntime.initModule('shared.js'), but it does not include ashared.js because the per-client shipped state attributes thatThis distinction matters because notifyPayloadDelivered() acknowledges
transport delivery, not successful JavaScript evaluation.
The second lazy payload must not depend on a factory that has never been
registered in the client runtime. It should either include the shared factory
or use a protocol that confirms successful runtime registration before omitting
it from later payloads.
The lockfile pins the pkg.pr.new package for Rolldown commit
224f40bd081f80b108026c07315ae741ac3baa84, which contains the fix from
rolldown#10772.