ci(web): fail bundle check when no JS chunks found (avoid false green)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-03 23:31:08 +02:00
parent 89132f6745
commit 397e606793
+4
View File
@@ -6,6 +6,10 @@ import { join } from "node:path";
const BUDGET_KB = 150;
const dir = "dist/assets";
const jsFiles = readdirSync(dir).filter((f) => f.endsWith(".js"));
if (jsFiles.length === 0) {
console.error(`no JS files found in ${dir} — was the build skipped?`);
process.exit(1);
}
let largest = 0;
let largestName = "";
for (const file of jsFiles) {