Mahdi RajaeeJournal
Back to the journalInfrastructure

Workers resolves modules by URL, not by path

Module specifier resolution changed from filesystem-style paths to URL-based resolution.

The change

Previously

Specifiers resolved as flat filesystem paths, so every dependency had to land in one bundle.

With this change

workerd resolves URL specifiers, including query strings and fragments, and compiles lazily.

What it means

Teams can use different specifier query strings to create separate module instances with independent state.

My take

Module identity became a URL problem, which is the bundler's problem moving into the runtime.

At the source

Cloudflareblog.cloudflare.com