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
If the issue is related to 1.x -> 2.0 upgrade, read the Migration Guide first.
Describe the bug
When { "type": "module" } is set in package.json and config is written in TypeScript, the error below occurs with vite & vite build.
failed to load config from /Users/green/Downloads/vite-project/vite.config.ts
error when starting dev server:
TypeError [ERR_INVALID_URL]: Invalid URL: vite
at onParseError (internal/url.js:259:9)
at new URL (internal/url.js:335:5)
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:790:5)
at Loader.resolve (internal/modules/esm/loader.js:86:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:230:28)
at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:56:40)
at link (internal/modules/esm/module_job.js:55:36)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Reproduction
Run npm init @vitejs/app and select vue-ts.
Add
"type": "module"
to package.json.
3. Run npm run serve or npm run build.
System Info
vite version: 2.0.0-beta.30
Operating System: Windows 10
Node version: v14.15.4
Package manager (npm/yarn/pnpm) and version: npm 6.14.11
The text was updated successfully, but these errors were encountered:
Describe the bug
When
{ "type": "module" }
is set inpackage.json
and config is written in TypeScript, the error below occurs withvite
&vite build
.Reproduction
npm init @vitejs/app
and selectvue-ts
.to package.json.
3. Run
npm run serve
ornpm run build
.System Info
vite
version: 2.0.0-beta.30The text was updated successfully, but these errors were encountered: