Cloudflare Rebuilt Workers' Module Registry for Full Node.js Compatibility

Cloudflare Blog · rss · 2026-09-09

Cloudflare rewrote the module registry in workerd, the open-source core of the Workers runtime, to be faster, more standards-compliant, and closer to Node.js. Workers now supports every stable Node.js API relevant to serverless, enabled by default, with app size raised to 64 MiB and the compressed-bundle limit removed.

The old registry resolved specifiers as filesystem paths rather than URLs, ruling out import.meta.url and import.meta.resolve(), and it eagerly compiled everything while keeping a private copy per V8 isolate. The new implementation treats specifiers as real URLs, compiles modules lazily, and shares caches—correctly handling query strings/fragments as distinct module instances, require() on ES modules per Node.js rules, import attributes validation, and WebAssembly source-phase imports.

Developers can opt in today via the newmoduleregistry compatibility flag; existing Workers are unaffected. The redesign also lets bundlers like Rolldown do fewer transformations, delegating module resolution to the runtime.

Original post →

More from Infra

Infra channel →