esbuild-tsc
v1.2.0
Published
An esbuild plugin which uses tsc to compile typescript files
Downloads
21
Maintainers
Readme
esbuild-tsc
About
An ESBuild plugin which uses tsc to compile typescript files
Motivation
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.
Installation
npm install --save-dev esbuild-tsc typescript
Basic Usage
Add this plugin to your esbuild build script:
Typescript:
import esbuildPluginTsc from 'esbuild-tsc';
...
esbuild.build({
...
plugins: [
esbuildPluginTsc(options),
],
});
Options
_tsconfigPath [string] _: Path of the tsconfig json file. filter [RegExp | Function]: A RegExp or function to filter files.