1min.

1MIN · ARCHITECTURE

Cloudflare rebuilds module loading for Node.js compatibility

Cloudflare rewrote workerd’s module registry to better match how Node.js resolves, loads, and caches code. The new design uses URL-based module identity and lazy compilation, and handles more CommonJS/ESM interactions. It shows why matching API names is not enough for runtime compatibility. The registry was opt-in when the article was published.

Cloudflare · Sep 9, 2026

Why it matters

A useful case study for behavior-preserving rewrites and compatibility work across different implementations.

More context

The old registry treated module names more like filesystem paths. The new design models URL identity directly, including query strings and fragments, and aligns several CommonJS/ESM interactions with Node.js. That moves compatibility into the runtime instead of requiring bundlers to compensate.

Keep in mind

The article describes an opt-in compatibility flag at publication. Check the current runtime documentation before enabling it in production.

Original read

More engineering ideas, one minute at a time.

Explore more stories