1.0.0 • Published 4 years ago

fast-esbuild-loader v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

esbuild-loader

esbuild is by far one of the fastest TS/ESNext to ES6 compilers, so it makes sense to use it over Babel/TSC with webpack to take advantage of both worlds (Speed and the webpack ecosytem).

You might also like maho, a React framework powered by esbuild.

Install

yarn add esbuild-loader --dev

Usage

In webpack.config.js:

const { ESBuildPlugin } = require('esbuild-loader')

module.exports = {
  module: {
    rules: [
      {
        test: /\.[jt]sx?$/,
        loader: 'esbuild-loader',
        options: {
          // All options are optional
          target: 'es2015', // default, or 'es20XX', 'esnext'
          jsxFactory: 'React.createElement',
          jsxFragment: 'React.Fragment',
          sourceMap: false // Enable sourcemap
        },
      },
    ],
  },
  plugins: [new ESBuildPlugin()],
}

License

MIT © EGOIST (Kevin Titor)

1.0.0

4 years ago