-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Description
Version: Deno 2.5.4
Follow the steps at https://docs.deno.com/examples/vue_tutorial/
deno run -A npm:create-vite
- Use Vue and Typescript.
deno install
deno task dev
works as expected.
However:
deno task build
fails with
> deno task build
Task build vue-tsc -b && vite build
src/main.ts:3:17 - error TS2307: Cannot find module './App.vue' or its corresponding type declarations.
3 import App from './App.vue'
~~~~~~~~~~~
Found 1 error.
To fix this, create src/vite-env.d.ts
with
/// <reference types="vite/client" />
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}
Then deno task build
creates a proper build at dist
as expected and deno task preview
works.
However:
Introduce a basic error (const foo = bar;
) or a subtle lint issue in src/App.vue
such as an unread variable. The deno task build
command says it run vue-tsc -b && vite build
but it fails to pick up issues in src/App.vue
. Running npx vue-tsc -b
directly does detect these issues.
One thing I noticed is that node_modules/.tmp/tsconfig.app.tsbuildinfo
says {"root":["../../src/App.vue","../../src/main.ts","../../src/vite-env.d.ts"],"version":"5.9.3"}
so it's missing the App.vue
file.
Metadata
Metadata
Assignees
Labels
No labels