Skip to content

Bundle size

Every package in this repo has a hard size budget enforced in CI. Cross the limit, the PR fails.

PackageEntryBudgetActual (gzipped)
store-kitindex.mjs2 KB~1.2 KB
fetch-kitindex.mjs3.1 KB~3 KB
fetch-kitreact.mjs1.5 KB~0.75 KB
log-kitindex.mjs2 KB~1.1 KB
log-kittransports/console.mjs1 KB~0.4 KB
log-kittransports/http.mjs1.5 KB~0.5 KB
log-kittransports/file.mjs1 KB~0.65 KB
log-kittransports/datadog.mjs1.25 KB~1.0 KB
config-kitindex.mjs2 KB~1.4 KB

Bundle size regresses silently. A “small” helper here, a polyfill there, a transitive dep update - six months later your “tiny” library is 14 KB and nobody noticed. The budget makes regressions visible at the moment they happen.

size-limit bundles the package the way a real consumer would (esbuild, with peer deps externalized), gzips the result, compares against the budget. Run locally:

Terminal window
pnpm -r --filter=./packages/* size

If a feature genuinely needs more bytes, the budget gets raised - in the same PR that adds the feature, with a one-line justification in the changeset entry. The budget is a forcing function for intentional growth, not a permanent ceiling.

  • react and react-dom (peer deps)
  • zustand (peer dep of store-kit)
  • zod (optional peer of fetch-kit)