Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vite-plugin-ts-checker

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-ts-checker

Vite plugin that runs TypeScript type checker on a separate process.

  • 0.1.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
47
Maintainers
1
Weekly downloads
 
Created
Source

vite-plugin-ts-checker

Vite plugin that runs TypeScript type checker on a separate process.

Features

  • ⚡️ Out of the box
  • 💚 Support Vue3 with vue-tsc (build mode only for now)
  • 🚥 Vite HMR overlay
  • 🎳 Serve & build mode (TypeScript)

screenshot

Usage

Install

Install plugin
npm i vite-plugin-ts-checker -D

# yarn add vite-plugin-ts-checker -D
# pnpm i vite-plugin-ts-checker -D
Install peer dependencies

vite-plugin-ts-checker requires

to be installed as peer dependency.

Add to vite.config.js

// vite.config.js
import TsChecker from 'vite-plugin-ts-checker'

export default {
  plugins: [TsChecker()],

  // or use options
  // plugins: [TsChecker({ ...options })], // see options
}

Options

export interface PluginOptions {
  /**
   * Use `"tsc"` or `"vue-tsc"`
   * @defaultValue `"tcs"`
   */
  checker: 'tsc' | 'vue-tsc'
  /**
   * Throw in build mode if has error
   * @defaultValue `true`
   */
  enableBuild: boolean
  /**
   * Show overlay when has TypeScript error
   * @defaultValue
   * Same as [Vite config](https://vitejs.dev/config/#root)
   */
  overlay: boolean
  /**
   * Root path to find tsconfig file
   * @defaultValue
   * Same as Vite https://vitejs.dev/config/#root
   */
  root: string
  /**
   * Relative tsconfig path to {@link (PluginOptions:interface).root}
   * @defaultValue `"tsconfig.json"`
   */
  tsconfigPath: string
}

Examples

Run projects in examples/* to try it out.

pnpm i
cd ./examples/<ONE_EXAMPLE>
npm run dev

Roadmap

  • Support Vue2 by VLS (draft PR)
  • Support project reference
  • Wait for vue-tsc to support watch mode

License

MIT

Keywords

FAQs

Package last updated on 10 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc