esbuild-plugin-babel
An esbuild plugin that runs babel for es5 transpilation.
Install
sh
npm i -D @chialab/esbuild-plugin-babel
sh
yarn add -D @chialab/esbuild-plugin-babel
sh
pnpm add -D @chialab/esbuild-plugin-babel
Usage
INFO
If no configuration is provided, the plugin defaults already includes typescript syntax support, the env preset and supports the transpilation of tagged templates with htm to JSX.
ts
import babelPlugin from '@chialab/esbuild-plugin-babel';
import esbuild from 'esbuild';
await esbuild.build({
plugins: [
babelPlugin({
// babel config
}),
],
});