import { build } from "esbuild"; import { cp, mkdir } from "node:fs/promises"; await mkdir("dist/web", { recursive: true }); await build({ entryPoints: ["src/web/app.ts"], bundle: true, format: "esm", target: "es2022", outfile: "dist/web/app.js", sourcemap: true, minify: process.env.NODE_ENV === "production", }); await cp("src/web/index.html", "dist/web/index.html"); await cp("src/web/styles.css", "dist/web/styles.css"); await cp("src/web/manifest.webmanifest", "dist/web/manifest.webmanifest"); await cp("src/web/bilder", "dist/web/bilder", { recursive: true });