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.
Version: Deno 2.5.4
Follow the steps at https://docs.deno.com/examples/vue_tutorial/
deno run -A npm:create-vitedeno installdeno task devworks as expected.However:
deno task buildfails withTo fix this, create
src/vite-env.d.tswithThen
deno task buildcreates a proper build atdistas expected anddeno task previewworks.However:
Introduce a basic error (
const foo = bar;) or a subtle lint issue insrc/App.vuesuch as an unread variable. Thedeno task buildcommand says it runvue-tsc -b && vite buildbut it fails to pick up issues insrc/App.vue. Runningnpx vue-tsc -bdirectly does detect these issues.One thing I noticed is that
node_modules/.tmp/tsconfig.app.tsbuildinfosays{"root":["../../src/App.vue","../../src/main.ts","../../src/vite-env.d.ts"],"version":"5.9.3"}so it's missing theApp.vuefile.