# @emarketeer/esbuild-plugin-tsc

> An esbuild plugin which uses tsc to compile typescript files.

Latest version **0.4.1** (published 2022-02-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @emarketeer/esbuild-plugin-tsc
pnpm add @emarketeer/esbuild-plugin-tsc
yarn add @emarketeer/esbuild-plugin-tsc
bun add @emarketeer/esbuild-plugin-tsc
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.1 |
| Published | 2022-02-11 |
| First published | 2022-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 18.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Arseny Yankovski |
| Maintainers | ayankovsky |
| Keywords | esbuild, esbuild-plugin, tsc, typescript |

## Links

- npm: https://www.npmjs.com/package/@emarketeer/esbuild-plugin-tsc
- Repository: https://github.com/eMarketeerSE/esbuild-plugin-tsc
- Homepage: https://github.com/eMarketeerSE/esbuild-plugin-tsc#readme
- Issues: https://github.com/eMarketeerSE/esbuild-plugin-tsc/issues
- npm.io page: https://npm.io/package/@emarketeer/esbuild-plugin-tsc

## Dependencies (1)

- [strip-comments](https://npm.io/package/strip-comments.md) ^2.0.1

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.4.1 (latest) — 2022-02-11
- 0.4.0 — 2022-02-04

## README

# @emarketeer/esbuild-plugin-tsc

An esbuild plugin which uses tsc to compile typescript files.

## Why?

Esbuild natively supports typescript files - so if you are not using exotic typescript features this plugin is not meant for you!

I wanted to use [`typescripts emitDecoratorMetadata`](https://www.typescriptlang.org/tsconfig#emitDecoratorMetadata) feature, which is [not supported by esbuild](https://github.com/evanw/esbuild/issues/257). If you are only using typescript decorators in some files, this plugin allows you to convert only the files containing decorators and lets esbuild handle all other files.
If for some reason you want to use typescripts compiler for all files you can simple set the `force` option.

## Basic Usage

1. Install this plugin in your project:

   ```sh
   npm install --save-dev @emarketeer/esbuild-plugin-tsc typescript
   ```

2. Add this plugin to your esbuild build script:

   Javascript:
   ```diff
   +const esbuildPluginTsc = require('@emarketeer/esbuild-plugin-tsc');
    ...
    esbuild.build({
      ...
      plugins: [
   +    esbuildPluginTsc(),
      ],
    })
   ```

   Typescript:
   ```diff
   +import { esbuildPluginTsc } from '@emarketeer/esbuild-plugin-tsc';
    ...
    esbuild.build({
      ...
      plugins: [
   +    esbuildPluginTsc(),
      ],
    })
   ```

## Config

```typescript
esbuildPluginTsc{
    // If empty, uses tsconfig.json
    tsconfigPath?: string,
    // If true, force compilation with tsc
    force?: boolean,
    // If true, enables tsx file support
    tsx?: boolean
})
```

---
_Source: https://npm.io/package/@emarketeer/esbuild-plugin-tsc · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
