ESM modules in Cloudflare Workers

I tried to see if importing an ESM module would work in Workers:

await import('https://...')

But it produces a non-descript “Not supported” error.

I assume this means ESM modules are not supported in Cloudflare Workers, because the script is not run in a module context?

Is there a roadmap for ESM module support in workers? Implementing/enabling exports is unnecessary, but being able to import (synchronously and asynchronously) a dependency by an URL using ESM import would come in handy.

I’d assume that since eval and function invocations are disabled, then EMS wouldn’t be possible.

1 Like

They are not supported today, and it is something we would like to support.