Supported bundlers
Esbuild

Usage with esbuild

Installation

npm i -D @wyw-in-js/esbuild

Configuration

import wyw from '@wyw-in-js/esbuild';
import esbuild from 'esbuild';
 
const prod = process.env.NODE_ENV === 'production';
 
esbuild
  .build({
    entryPoints: ['src/index.ts'],
    outdir: 'dist',
    bundle: true,
    minify: prod,
    plugins: [
      wyw({
        filter: /\.(js|jsx|ts|tsx)$/,
        sourceMap: prod,
      }),
    ],
  })
  .catch(() => process.exit(1));