This commit is contained in:
2025-08-11 21:17:26 +02:00
parent ba81ce67c7
commit e8d8b449ce
3 changed files with 18 additions and 18 deletions

View File

@@ -21,17 +21,11 @@ const files = [
eventFiles.map(f => `src/events/${f}`)
].flat()
const banner = [
"const bun__build = true",
process.env.DOCKER === "1" ? "const bun__docker = true" : null
].filter(v => typeof v === "string").join("\n")
await Bun.build({
entrypoints: ["src/index.ts", ...files],
outdir: "dist",
target: "bun",
splitting: true,
minify: true,
sourcemap: process.env.NODE_ENV === "dev" ? "external" : undefined,
naming: {
entry: "[dir]/[name].[ext]",
@@ -39,5 +33,5 @@ await Bun.build({
asset: "asset/[name]-[hash].[ext]"
},
root: "src",
banner
banner: process.env.DOCKER === "1" ? "process.env.BUN__DOCKER = 'true'" : undefined
})