import { build } from "bun"; const result = await build({ entrypoints: ["./src/main.ts"], outdir: "./dist", target: "browser", minify: true, sourcemap: "external", }); if (!result.success) { console.error("Build failed", result.logs); process.exit(1); } // Copy HTML template with correct script reference const html = ` Dungeon Crawl — Ranged / Melee `; Bun.write("./dist/index.html", html); console.log("Build complete → dist/");