vite-plugin-ts-types
raw JSON → 1.0.0 verified Mon Apr 27 auth: no javascript deprecated
Vite plugin that runs TypeScript type checking in a separate process, reporting errors in the console and overlay. Current stable version appears to be 1.0.0 but the package has very limited information and appears to be from the legacy '@ice/app' monorepo. This plugin provides type checking during development and builds, similar to vite-plugin-checker or fork-ts-checker-webpack-plugin. However, it has minimal documentation and is not actively maintained; the latest release notes are from a separate monorepo (ice) and the actual plugin code is not well described. It likely integrates with Vite's dev server and build process to perform TypeScript diagnostics.
Common errors
error Error [ERR_REQUIRE_ESM]: require() of ES Module ↓
cause Package is ESM-only, used with require()
fix
Use import statement or dynamic import().
error TypeError: tsChecker is not a function ↓
cause Using CJS require without .default
fix
Use require('vite-plugin-ts-types').default or switch to import.
error Cannot find module 'vite-plugin-ts-types' ↓
cause Package not installed or not in node_modules
fix
Run npm install vite-plugin-ts-types -D
Warnings
deprecated Package is deprecated and no longer maintained. Use vite-plugin-checker or fork-ts-checker-webpack-plugin instead. ↓
fix Replace with vite-plugin-checker.
gotcha The plugin may not work with Vite 5+ due to internal API changes. ↓
fix Use an alternative plugin.
gotcha Documentation is sparse; the only config option is enableBuild (boolean). ↓
fix Refer to source code for other options.
Install
npm install vite-plugin-ts-types yarn add vite-plugin-ts-types pnpm add vite-plugin-ts-types Imports
- default wrong
const tsChecker = require('vite-plugin-ts-types')correctimport tsChecker from 'vite-plugin-ts-types' - TsCheckerOptions wrong
import { TsCheckerOptions } from 'vite-plugin-ts-types'correctimport type { TsCheckerOptions } from 'vite-plugin-ts-types' - default (CommonJS workaround) wrong
const tsChecker = require('vite-plugin-ts-types')correctconst tsChecker = require('vite-plugin-ts-types').default
Quickstart
import { defineConfig } from 'vite';
import tsChecker from 'vite-plugin-ts-types';
export default defineConfig({
plugins: [tsChecker({
// Enable type checking only in build
enableBuild: true,
})],
});