{"id":25419,"library":"esbuild-plugin-ts-checker","title":"esbuild-plugin-ts-checker","description":"A plugin for esbuild that runs TypeScript type checking in a separate worker thread, improving build performance by offloading type checks. Works both in build and watch modes. Version 1.0.2 stable, with infrequent updates. Alternatives: esbuild-plugin-typecheck or fork-ts-checker-webpack-plugin for webpack. Installed as a dev dependency alongside esbuild and TypeScript.","status":"active","version":"1.0.2","language":"javascript","source_language":"en","source_url":"git@github.com:andreisergiu98/esbuild-plugin-ts-checker","tags":["javascript","esbuild","types","typescript"],"install":[{"cmd":"npm install esbuild-plugin-ts-checker","lang":"bash","label":"npm"},{"cmd":"yarn add esbuild-plugin-ts-checker","lang":"bash","label":"yarn"},{"cmd":"pnpm add esbuild-plugin-ts-checker","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core peer dependency for bundling. Plugin integrates with esbuild's plugin system.","package":"esbuild","optional":false},{"reason":"Required for type-checking logic. Runs TypeScript compiler in a worker.","package":"typescript","optional":false}],"imports":[{"note":"Package is ESM-only; requires esbuild >= 0.12.0.","wrong":"const esbuildTsChecker = require('esbuild-plugin-ts-checker')","symbol":"esbuildTsChecker","correct":"import { esbuildTsChecker } from 'esbuild-plugin-ts-checker'"},{"note":"No default export. Use named import.","wrong":"import esbuildTsChecker from 'esbuild-plugin-ts-checker'","symbol":"default import","correct":"import { esbuildTsChecker } from 'esbuild-plugin-ts-checker'"},{"note":"TypeScript types are bundled; import type for options interface.","wrong":"","symbol":"Type","correct":"import type { EsbuildTsCheckerOptions } from 'esbuild-plugin-ts-checker'"}],"quickstart":{"code":"import { build } from 'esbuild';\nimport { esbuildTsChecker } from 'esbuild-plugin-ts-checker';\n\nawait build({\n  entryPoints: ['src/index.ts'],\n  outdir: 'dist',\n  bundle: true,\n  platform: 'node',\n  target: 'node14',\n  sourcemap: 'external',\n  plugins: [esbuildTsChecker()],\n});\nconsole.log('Build complete with type checking');","lang":"typescript","description":"Shows minimal esbuild build configuration using the type-checker plugin with bundling for Node.js."},"warnings":[{"fix":"Use esbuild 0.12.x or 0.13.x. For esbuild 0.14+, check for updated version of plugin.","message":"Plugin requires esbuild ^0.12.0 or ^0.13.0. Other versions may break.","severity":"gotcha","affected_versions":"<0.12.0 || >0.13.0 || >=0.14.0"},{"fix":"Set 'failOnError' option to true explicitly, or handle watch mode separately.","message":"In watch mode, type errors are printed but build does not fail. This may hide errors in CI.","severity":"gotcha","affected_versions":"*"},{"fix":"Upgrade TypeScript to 4.0.0 or later.","message":"TypeScript version must be >=4.0.0 due to worker thread API usage.","severity":"gotcha","affected_versions":"<4.0.0"},{"fix":"Upgrade Node.js to 12 or later.","message":"Plugin uses worker threads; requires Node.js version supporting worker_threads (>=12.0.0).","severity":"gotcha","affected_versions":"<12.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Downgrade esbuild to 0.13.x or check for a newer version of the plugin.","cause":"Version mismatch with peer dependency esbuild.","error":"Error: esbuild-plugin-ts-checker requires esbuild ^0.12.0 || ^0.13.0 but found 0.14.x"},{"fix":"Ensure tsconfig.json exists with correct path. Pass 'tsconfig' option explicitly if not default.","cause":"TypeScript compilation failed or tsconfig.json not found.","error":"TypeError: Cannot read properties of undefined (reading 'diagnostics')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}