This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Description
In fetchModule, if there is an error we have this catch logic:
|
if (moduleId.startsWith('cloudflare:')) { |
|
const result = { |
|
externalize: moduleId, |
|
type: 'module', |
|
} satisfies vite.FetchResult; |
|
|
|
return new MiniflareResponse(JSON.stringify(result)); |
|
} |
that externalizes cloudflare:* modules
Is this really correct?
Shouldn't cloudflare:* modules be externalized already?
|
external: [ |
|
'cloudflare:email', |
|
'cloudflare:sockets', |
|
'cloudflare:workers', |
|
], |
(this probably only applies to build 🤔)
I feel like we might be missing some config here, and we probably should not get cloudflare:* in the fetchModule 🤔
(or if this is ok it should be clear as to why we do need this ad-hoc module handling)