Registry / devops / esbuild-plugin-ts-checker

esbuild-plugin-ts-checker

JSON →
library1.0.2jsnpmunverified

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.

npm install esbuild-plugin-ts-checker
INSTALL
IMPORT
SIG · ESBUILD-PLUGIN-TS-
E
esbuild-plugin-ts-checker
devopsjavascriptv1.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

esbuildTsChecker
import { esbuildTsChecker } from 'esbuild-plugin-ts-checker'
const esbuildTsChecker = require('esbuild-plugin-ts-checker')
Package is ESM-only; requires esbuild >= 0.12.0.
default import
import { esbuildTsChecker } from 'esbuild-plugin-ts-checker'
import esbuildTsChecker from 'esbuild-plugin-ts-checker'
No default export. Use named import.
Type
import type { EsbuildTsCheckerOptions } from 'esbuild-plugin-ts-checker'
TypeScript types are bundled; import type for options interface.

Shows minimal esbuild build configuration using the type-checker plugin with bundling for Node.js.

import { build } from 'esbuild'; import { esbuildTsChecker } from 'esbuild-plugin-ts-checker'; await build({ entryPoints: ['src/index.ts'], outdir: 'dist', bundle: true, platform: 'node', target: 'node14', sourcemap: 'external', plugins: [esbuildTsChecker()], }); console.log('Build complete with type checking');
Debug
Known issues
gotchaPlugin requires esbuild ^0.12.0 or ^0.13.0. Other versions may break.
fix
Use esbuild 0.12.x or 0.13.x. For esbuild 0.14+, check for updated version of plugin.
affects: <0.12.0 || >0.13.0 || >=0.14.0
gotchaIn watch mode, type errors are printed but build does not fail. This may hide errors in CI.
fix
Set 'failOnError' option to true explicitly, or handle watch mode separately.
affects: *
gotchaTypeScript version must be >=4.0.0 due to worker thread API usage.
fix
Upgrade TypeScript to 4.0.0 or later.
affects: <4.0.0
gotchaPlugin uses worker threads; requires Node.js version supporting worker_threads (>=12.0.0).
fix
Upgrade Node.js to 12 or later.
affects: <12.0.0
Errors
Common errors & fixes
Error: esbuild-plugin-ts-checker requires esbuild ^0.12.0 || ^0.13.0 but found 0.14.x
Version mismatch with peer dependency esbuild.
fix
Downgrade esbuild to 0.13.x or check for a newer version of the plugin.
TypeError: Cannot read properties of undefined (reading 'diagnostics')
TypeScript compilation failed or tsconfig.json not found.
fix
Ensure tsconfig.json exists with correct path. Pass 'tsconfig' option explicitly if not default.
Upgrade
Version history
1.0.2latest on npm
Audit
Dependencies
esbuildrequiredCore peer dependency for bundling. Plugin integrates with esbuild's plugin system.
typescriptrequiredRequired for type-checking logic. Runs TypeScript compiler in a worker.
Agent activity
6 hits · last 30 days
node
6
Resources
esbuild-plugin-ts-checker — npm install esbuild-plugin-ts-checker · libregistry