-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.js
More file actions
27 lines (25 loc) · 598 Bytes
/
build.js
File metadata and controls
27 lines (25 loc) · 598 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import esBuild from "esbuild"
const buildDate = new Date()
await esBuild.build({
banner: {
js:
`/**\n` +
` * Blu (blutooth) ` +
`${process.env.npm_package_version}\n` +
` * Copyright (c) ${buildDate.getFullYear()} ` +
`Max Herrmann\n` +
` * https://github.com/maxherrmann/blu/blob/main/LICENSE\n` +
` * (Built on ${buildDate.toUTCString()})\n` +
` */`,
},
bundle: true,
entryPoints: ["src/index.ts"],
external: ["zod", "jaset"],
format: "esm",
keepNames: true,
minify: true,
outfile: "dist/index.js",
sourcemap: true,
target: "es2019",
treeShaking: true,
})