{"id":22894,"library":"vite-plugin-tsc","title":"vite-plugin-tsc","description":"A Vite plugin that spawns an external `tsc --watch` process alongside the Vite dev server, providing TypeScript type checking without interfering with Vite's own transpilation. Current version 0.1.1. Release cadence is low (sporadic). Key differentiator: unlike fork-ts-checker-webpack-plugin for webpack or vite-plugin-checker, this plugin strictly uses `tsc --watch` and deliberately avoids any bundler integration, giving a pure TypeScript checker experience. It utilizes the `configResolved` hook and is not compatible with other bundlers.","status":"active","version":"0.1.1","language":"javascript","source_language":"en","source_url":"https://github.com/kazuma1989/vite-plugin-tsc","tags":["javascript","typescript","vite","vite-plugin"],"install":[{"cmd":"npm install vite-plugin-tsc","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-tsc","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-tsc","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required as a peer dependency to run `tsc --watch`.","package":"typescript","optional":false},{"reason":"Required as a peer dependency because the plugin is Vite-specific.","package":"vite","optional":false}],"imports":[{"note":"The package exports a default function. Named import will not work.","wrong":"import { tscPlugin } from 'vite-plugin-tsc'","symbol":"tscPlugin","correct":"import tscPlugin from 'vite-plugin-tsc'"},{"note":"In CommonJS, you must use the default export via require(). The named export does not exist.","wrong":"const { tscPlugin } = require('vite-plugin-tsc')","symbol":"default import (tscPlugin)","correct":"const tscPlugin = require('vite-plugin-tsc')"},{"note":"The package does not export any TypeScript types. Use Vite's Plugin type for strict typing.","wrong":"import type { TscPlugin } from 'vite-plugin-tsc'","symbol":"Plugin type (TypeScript)","correct":"import type { Plugin } from 'vite'"}],"quickstart":{"code":"// vite.config.js\nimport tscPlugin from 'vite-plugin-tsc'\n\nexport default {\n  plugins: [\n    tscPlugin()\n  ],\n  logLevel: 'silent'\n}","lang":"javascript","description":"Shows minimal configuration to enable tsc --watch in Vite dev server, suppressing Vite's default logs."},"warnings":[{"fix":"Configure `tsc` via `tsconfig.json` or command-line flags passed to the plugin if supported (currently not).","message":"The plugin does not pass configuration options to `tsc`. It always runs `tsc --watch` with default settings.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use `logLevel: 'silent'` as recommended, but be aware it silences Vite logs, not tsc output.","message":"Setting `logLevel: 'silent'` suppresses Vite's own logs but not `tsc` output. Some Vite logs may still appear.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Ensure you are using Vite as the build tool. For other tools, consider fork-ts-checker-webpack-plugin or other alternatives.","message":"The plugin is Vite-only and will not work with other build tools (e.g., webpack, Rollup standalone).","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"No options are supported. Future versions may accept an options object.","message":"The plugin currently has no options object; calling `tscPlugin(options)` will silently ignore options.","severity":"breaking","affected_versions":"0.1.1"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `npm install -D vite-plugin-tsc` in your project directory.","cause":"The package is not installed.","error":"Error: Cannot find module 'vite-plugin-tsc'"},{"fix":"Use `import tscPlugin from 'vite-plugin-tsc'` (default import) instead of `import { tscPlugin } from 'vite-plugin-tsc'`.","cause":"Using named import instead of default import.","error":"TypeError: tscPlugin is not a function"},{"fix":"Use `const tscPlugin = require('vite-plugin-tsc')` and then call `tscPlugin()`.","cause":"CommonJS require() with destructuring or wrong call.","error":"TypeError: (0 , vitePluginTsc_1.default) is not a function"},{"fix":"Install `@types/node` if needed, or add `vite-plugin-tsc` to `types` in tsconfig.json.","cause":"TypeScript config not recognizing the import; likely missing type declaration.","error":"Cannot find name 'tscPlugin'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}