-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate the fetchModule
's cloudflare:
catch
#46
Comments
From my understanding, Simplified:
Importing a file |
I think it all boils down to this ( source ): // builtins should always be externalized
if (url.startsWith('data:') || isBuiltin(url)) {
return { externalize: url, type: 'builtin' }
} when you import directly from userland code this dev environment I think this might be expected then... 😕 |
* remove unnecessary node-built-ins bits from module resolution playground * allow playground test variant vite config files to have any sensible extension * simplify cloudflare external import handling in __VITE_FETCH_MODULE * Improve module runner error handling * add node.js compat (minus global) support * add global support * add jsdoc * use a different cache for each playground variant * only alias Node.js built-ins for environments that need it * fix formatting * remove excess runtime.d.ts files * remove unnecessary eforce pre * move node-compat stuff out of the main plugin code where possible * Do not use ? to encode the virtual alias module * remove unnecesary object spread * merge aliases * simplify the code that uses normalized config * add link to #46 in comment * add blank line to prettier ignore file * fix node-compat playground package name * remove unnecessary console log * fix casting of caught error * fix node-compat test scripts * cleaner way to identify the entry point for injecting globals * fix entry-point computation * uncomment fixed test * simplify node-compat playground typings * ensure playwright deps are installed for CI jobs * remove unnecessary prettyignore line * improve crypto test * test some aspects of the pg library in CI * add test of user aliases working with the ones added by our plugin * Revert "merge aliases" This reverts commit beef454. * fix formatting * fixup! add test of user aliases working with the ones added by our plugin
This might be addressed by vitejs/vite#18584 |
In fetchModule, if there is an error we have this catch logic:
vite-plugin-cloudflare/packages/vite-plugin-cloudflare/src/miniflare-options.ts
Lines 230 to 237 in 7adf439
that externalizes
cloudflare:*
modulesIs this really correct?
Shouldn't
cloudflare:*
modules be externalized already?vite-plugin-cloudflare/packages/vite-plugin-cloudflare/src/cloudflare-environment.ts
Lines 171 to 175 in 7adf439
(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)
The text was updated successfully, but these errors were encountered: