Cloudflare Artifact Budgets
Cloudflare artifact performance budgets
Use the Cloudflare artifact budget gate after Cloudflare-oriented builds have already produced deploy outputs. It inspects files in place and does not run a build.
bash
1mise exec -- node tools/scripts/check-cloudflare-artifact-budgets.mjsUseful options:
bash
1mise exec -- node tools/scripts/check-cloudflare-artifact-budgets.mjs --app www2mise exec -- node tools/scripts/check-cloudflare-artifact-budgets.mjs --app manager3mise exec -- node tools/scripts/check-cloudflare-artifact-budgets.mjs --allow-missing --dry-runThe default config is tools/cloudflare-artifact-budgets.json. It covers:
apps/www/.next-buildandapps/www/.open-nextapps/manager/build- OpenNext Worker app outputs under
apps/*/.open-next
The gate reports these budget metrics per app:
javascriptGzip— total gzip size of JavaScript-like files (.js,.mjs)assetsRaw— total raw size of deploy asset file typeslargestAssetRaw— largest individual asset fileworkerRaw— raw size of Worker files, primarily.open-next/worker/**
If a budget fails, the command exits non-zero and prints the app, metric, measured size, and configured limit. Treat config changes as intentional budget changes and review them with the same care as application changes.