Esbuild Plugin Babel • A pluggable esbuild plugin that runs babel for es5 transpilation.
$ npm i @chialab/esbuild-plugin-babel -D
$ yarn add @chialab/esbuild-plugin-babel -D
import esbuild from 'esbuild';
import babelPlugin from '@chialab/esbuild-plugin-babel';
await esbuild.build({
plugins: [
babelPlugin({
plugins: [...],
}),
],
});
Please not that it already includes typescript syntax support, the env preset and supports the transpilation of tagged templates with htm to JSX.
Esbuild Plugin Babel is released under the MIT license.