# esbuild-plugin-babel

> Babel plugin for esbuild.

Latest version **0.2.3** (published 2021-02-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install esbuild-plugin-babel
pnpm add esbuild-plugin-babel
yarn add esbuild-plugin-babel
bun add esbuild-plugin-babel
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.3 |
| Published | 2021-02-23 |
| First published | 2021-01-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Antoine Boulanger |
| Maintainers | antoineboulanger |
| Keywords | babel, esbuild, esbuild-plugin |

## Links

- npm: https://www.npmjs.com/package/esbuild-plugin-babel
- Repository: https://github.com/nativew/esbuild-plugin-babel
- Homepage: https://github.com/nativew/esbuild-plugin-babel#readme
- Issues: https://github.com/nativew/esbuild-plugin-babel/issues
- npm.io page: https://npm.io/package/esbuild-plugin-babel

## 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.2.3 (latest) — 2021-02-23
- 0.2.2 — 2021-02-17
- 0.2.1 — 2021-02-12
- 0.2.0 — 2021-01-26
- 0.1.2 — 2021-01-23
- 0.1.1 — 2021-01-17
- 0.1.0 — 2021-01-17
- 0.0.0 — 2021-01-15

## README

# esbuild-plugin-babel

[Babel](https://github.com/babel/babel) plugin for [esbuild](https://github.com/evanw/esbuild).

<br>

First, check if [esbuild supports](https://esbuild.github.io/content-types/) the transform you need _(it's faster)_.  
If not, you can add the Babel plugin you need with this plugin.

<br>

### Install

```zsh
npm install esbuild-plugin-babel --save-dev
```

<br>

### Use

`esbuild.config.js`

```js
import esbuild from 'esbuild';
import babel from 'esbuild-plugin-babel';

esbuild
    .build({
        entryPoints: ['index.js'],
        bundle: true,
        outfile: 'main.js',
        plugins: [babel()]
    })
    .catch(() => process.exit(1));
```

`package.json`

```json
{
    "type": "module",
    "scripts": {
        "start": "node esbuild.config.js"
    }
}
```

<br>

### Configure

`esbuild.config.js`

```js
babel({
    filter: /.*/,
    namespace: '',
    config: {} // babel config here or in babel.config.json
});
```

[`babel.config.json`](https://babeljs.io/docs/en/configuration)

```json
{
    "sourceMaps": "inline",
    "presets": [...],
    "plugins": [...]
}
```

<br>

### Check

[esbuild-plugin-pipe](https://github.com/nativew/esbuild-plugin-pipe) &nbsp; → &nbsp; Pipe esbuild plugins output.

[esbuild-plugin-postcss-literal](https://github.com/nativew/esbuild-plugin-postcss-literal) &nbsp; → &nbsp; PostCSS tagged template literals plugin for esbuild.

<br>

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