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:
@@ -6,6 +6,10 @@ import { join } from "node:path";
|
|||||||
const BUDGET_KB = 150;
|
const BUDGET_KB = 150;
|
||||||
const dir = "dist/assets";
|
const dir = "dist/assets";
|
||||||
const jsFiles = readdirSync(dir).filter((f) => f.endsWith(".js"));
|
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 largest = 0;
|
||||||
let largestName = "";
|
let largestName = "";
|
||||||
for (const file of jsFiles) {
|
for (const file of jsFiles) {
|
||||||
|
|||||||
Reference in New Issue
Block a user