Skip to content

Bundle Analysis

Terminal window
frontend-qa bundle --dir dist

--dir is required — point it at your build output directory (e.g. Vite’s dist/, Next.js’s .next/). bundle walks the directory and flags oversized JS/CSS chunks as Issues, with no browser involved.

After your production build, either locally or in CI:

Terminal window
npm run build
frontend-qa bundle --dir dist

Exits 1 if any high or critical issue is found, 0 otherwise — same convention as static, independent of scan’s --fail-on.

Terminal window
frontend-qa bundle --dir dist
[frontend-qa] bundle analysis: dist
[frontend-qa] issues: 1 (high=1)
- [high] bundle.chunk-size: assets/index-a1b2c3.js is 812KB (exceeds threshold) — dist/assets/index-a1b2c3.js