An ESBuild plugin which uses tsc to compile typescript files
Esbuild natively supports typescript files, but not TypeScript decorators. TypeScript decorators are different from EcmaScript decorators. If TypeScript decorators are used in your project, tsc should be used to transpile.
npm install --save-dev esbuild-tsc typescript
Add this plugin to your esbuild build script:
Typescript:
import esbuildPluginTsc from 'esbuild-tsc';
...
esbuild.build({
...
plugins: [
esbuildPluginTsc(options),
],
});
_tsconfigPath [string] _: Path of the tsconfig json file. filter [RegExp | Function]: A RegExp or function to filter files.