Skip to content

vue-tsc (Vue Language Tools)

You can use vue-tsc checker for your Vue 3 project.

Installation

INFO

Since 0.7.0, vue-tsc requires at least >= 2.0.0, with typescript >= 5.0.0. If you can't upgrade to the latest version, please use 0.6.x or below version.

  1. Make sure vue-tsc & typescript are installed as a peer dependency of your Vite project.

    bash
    pnpm add vue-tsc@latest typescript -D
  2. Add vueTsc field to plugin config.

    js
    export default {
      plugins: [checker({ vueTsc: true /** or an object config */ })],
    }

Configuration

Advanced object configuration table of options.vueTsc

fieldTypeDefault valueDescription
rootstringVite config rootRoot path to find tsconfig file
tsconfigPathstring"tsconfig.json"Relative tsconfig path to root
buildModebooleanfalseAdd --build to vue-tsc flag, note that noEmit does NOT work if buildMode is true (#36917)

Released under the MIT License.