const esbuild = require("esbuild");
const { nodeExternalsPlugin } = require("esbuild-node-externals");

esbuild
  .build({
    entryPoints: ["src/index.ts"],
    outdir: "build",
    bundle: true,
    sourcemap: true,
    minify: true,
    splitting: false,
    format: "cjs",
    target: ["es6"],
    plugins: [nodeExternalsPlugin()],
  })
  .catch(() => process.exit(1));
