-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Vite not reporting type errors in .vue files during dev / build #2539
Comments
That's expected: Vite explicit does NOT handle type checking by itself: https://vitejs.dev/guide/features.html#typescript
|
@yyx990803 Thank you for your answer.
I used |
Ah, I used
|
@yyx990803 type checking in IDE is not enough, I think we need a plugin like https://github.com/TypeStrong/fork-ts-checker-webpack-plugin |
@kikyous The newest template for ts already use
You could upgrade your own |
@Shinigami92 but vue-tsc can not work in watch mode |
As Evan already said:
|
Describe the bug
Type errors are not detected in
.vue
files, neither in dev mode (vite dev
) nor when building (vite build
).Reproduction
vue-ts
project usingnpm init @vitejs/app
src/components/HelloWorld.vue
, add the following line:Run
vite dev
: no error reported.Run
vite build
: no error reported.This is a duplicate of #749 which was closed.
System Info
vite
version: 2.1.0Logs (Optional if provided reproduction)
vite
orvite build
with the--debug
flag.Buid log
The text was updated successfully, but these errors were encountered: