#10902·rolldown

[Bug]: Initial UMD bundle omits `registerGraph`, breaking dependency-first HMR

Author: eppequeCreated Sep 16, 2026Updated Sep 16, 2026
Labelsneeds-triage

Reproduction link or steps

https://github.com/eppeque/rolldown-umd-hmr-repro

What is expected?

Both formats should initialize the runtime's importer graph in the initial bundle.

What is actually happening?

A dev build with format: 'umd' produces output with no registerGraph at all, so the client walk has no edges.

System Info

bash
System:
    OS: Linux 6.18 Debian GNU/Linux 13 (trixie) 13 (trixie)
    CPU: (12) x64 11th Gen Intel(R) Core(TM) i5-11600K @ 3.90GHz
    Memory: 6.17 GB / 7.67 GB
    Container: Yes
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 26.8.1 - /home/eppeque/.local/share/pnpm/bin/node
    pnpm: 12.4.1 - /home/eppeque/.local/share/pnpm/bin/pnpm
    bun: 1.4.2 - /home/eppeque/.local/share/pnpm/bin/bun
  npmPackages:
    rolldown: 1.2.8 => 1.2.8

Any additional comments?

This appears to be the problem already identified in point number 2 of this review comment on PR #10164, which proposes rejecting non-ESM formats in dev mode.

Would it be possible to emit the missing registerGraph() call for UMD initial/rebuild bundles instead of rejecting non-ESM formats?

My use case is a development server for SharePoint Framework (SPFx) web parts. I rely on UMD for the initial bundle because it is consumed by SPFx's AMD loader. The HMR patches are already loaded as ESM, so I do not need UMD-formatted patches.

As a local workaround, registering the initial graph inside the UMD factory, before its return, fixes the issue. Keeping registration inside the factory also preserves deferred AMD execution.