2.2.0 • Published 1 year ago

@terwer/esbuild-config-custom v2.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

esbuild-config-custom

universal esbuild tool for library

Usages

1 install dependency

pnpm add @terwer/esbuild-config-custom@latest -D

2 add esbuild.config.js to project root

for lib

import { dtsPlugin } from "esbuild-plugin-d.ts"

export default {
  esbuildConfig: {
    entryPoints: ["src/index.ts"],
    outfile: "dist/index.cjs",
    bundle: true,
    format: "cjs",
    plugins: [dtsPlugin()],
  }
}

for node

import { dtsPlugin } from "esbuild-plugin-d.ts"

export default {
  esbuildConfig: {
    entryPoints: ["src/index.ts"],
    outfile: "dist/index.cjs",
    bundle: true,
    format: "cjs",
    platform: "node",
    banner: {
      js: "#!/usr/bin/env node",
    },
    plugins: [dtsPlugin()],
  }
}

3 add build script

"scripts": {
    "dev": "zhi-build --watch",
    "build": "zhi-build --production"
}
2.2.0

1 year ago

2.1.2

1 year ago

2.1.1

1 year ago

2.1.4

1 year ago

2.1.3

1 year ago

2.1.0

1 year ago

1.2.0

2 years ago

2.0.0

2 years ago

1.0.11

2 years ago

1.0.12

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.10

2 years ago

1.1.0

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago