esbuild-tsc is an ESBuild plugin that uses the TypeScript compiler (tsc) to transpile TypeScript files, specifically enabling support for TypeScript decorators which ESBuild does not natively handle. Current stable version is 1.2.0, with updates following bug fixes and minor improvements. It is typically released on demand. Key differentiator: unlike other plugins that use Babel or SWC for TypeScript decorators, this leverages tsc directly, ensuring full compatibility with TypeScript's own decorator implementation and strict type checking. Requires Node >=16, peer dependency on typescript and esbuild.
npm install esbuild-tscNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to configure esbuild with esbuild-tsc plugin to compile TypeScript files supporting decorators.
Update Node, esbuild, and typescript to minimum required versions.
Ensure the plugin is added to the plugins array and the filter covers your files (default: all .ts files).
Use tsconfig.json's include/exclude patterns instead of filter.
Use only on files that require tsc (e.g., with decorators). Consider using esbuild's native TS for other files.
npm install --save-dev typescript
import esbuildPluginTsc from 'esbuild-tsc'
Provide absolute path to tsconfig.json or ensure it exists in the working directory.