Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vite-plugin-checker not recognizing errors when running the application

Since Vite is not able to recognize Typescript errors, I want the Vite-plugin-checker to check them for me while developing. Following the documentation, I installed as dev dependency:

"vite-plugin-checker": "^0.5.6",
"vue-tsc": "^1.2.0"
"typescript": "^5.0.3",

Then, in my vite.config.ts, I use the plugin:

import checker from 'vite-plugin-checker'

    plugins: [
      vue(),
      checker({typescript: true, vueTsc: true})
    ]

But when I run the application, it doesn't recognize any error. If I run it in build mode, it does. What's the problem here?

like image 804
Little Monkey Avatar asked May 11 '26 10:05

Little Monkey


1 Answers

If any one still stuck on this issue, I could resolve it by adding the path to tsconfig like below.

checker({
  vueTsc: {
    tsconfigPath: './tsconfig.app.json',
  },
}),

Below are some useful commands to check this issue to see the files are listened by the vue-tsc

npx vue-tsc --noEmit -p tsconfig.app.json --diagnostics
npx vue-tsc --noEmit --diagnostics
like image 102
rrr Avatar answered May 14 '26 08:05

rrr