2.2.0 • Published 4 months ago

@terwer/esbuild-config-custom v2.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months 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

4 months ago

2.1.2

4 months ago

2.1.1

4 months ago

2.1.4

4 months ago

2.1.3

4 months ago

2.1.0

4 months ago

1.2.0

9 months ago

2.0.0

8 months ago

1.0.11

11 months ago

1.0.12

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.10

11 months ago

1.1.0

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago