How we rebuilt Cloudflare Workers’ module registry for Node.js compatibility
Cloudflare rewrote the Workers (workerd) module registry for Node.js-compatible URL-based module resolution, shipped behind the new_module_registry flag with a 64 MiB bundle limit.
Cloudflare rebuilt the module registry in workerd, the open-source Workers runtime, so module specifiers are resolved as URLs and ESM, CommonJS, and WebAssembly modules follow Node.js semantics. The change is enabled with the new_module_registry compatibility flag and adds import.meta.resolve(), require(esm), import attributes validation, lazy compilation, and cross-isolate cache sharing. It also lifts the compressed bundle size limit to 64 MiB on all plans; the legacy registry implementation remains available.