You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows, in a project with "type": "module" set in package.json, I am unable to import a shared config into vite.config.ts without receiving a ERR_UNSUPPORTED_ESM_URL_SCHEME error. This appears to be the same issue that #1712 refers to but it seems the fix implemented for that missed the imported file paths.
failed to load config from D:\scratch\vite-repro\vite-package\vite.config.ts
error during build:
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'd:'
at new NodeError (node:internal/errors:371:5)
at throwIfUnsupportedURLProtocol (node:internal/modules/esm/resolve:1033:11)
at defaultResolve (node:internal/modules/esm/resolve:1103:3)
at ESMLoader.resolve (node:internal/modules/esm/loader:530:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:251:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:79:40)
at link (node:internal/modules/esm/module_job:78:36)
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
On Windows, in a project with
"type": "module"
set inpackage.json
, I am unable to import a shared config intovite.config.ts
without receiving aERR_UNSUPPORTED_ESM_URL_SCHEME
error. This appears to be the same issue that #1712 refers to but it seems the fix implemented for that missed the imported file paths.Discussed on Discord here: https://discord.com/channels/804011606160703521/814182556068085760/1003178053779865640
Reproduction
https://github.com/SilentEchoUK/esm-url-vite-repro
System Info
Used Package Manager
pnpm
Logs
Validations
The text was updated successfully, but these errors were encountered: