Skip to main content

Requirements

  • Next.js 15 or 16, App Router
  • Node 20+
  • A production build. crust refuses to measure next dev — dev output is unminified, unbundled and HMR-laden, so any number taken from it is fiction.

1. Build, then analyze

The snapshot is written to .perf/ — one file per build, so two branches recording builds never conflict.

2. See it visually

A single self-contained HTML file: summary figures, the route table, and per-route detail with the modules, dependencies, client boundaries and holes. No server, no integration, nothing external.

3. Compare against a baseline

After a change, rebuild and diff:
crust diff accepts a build id, a git SHA, a branch name, or HEAD~3. History is walked topologically, so a snapshot recorded later on another branch is never mistaken for an ancestor.

Unlock per-file attribution

Route sizes, rendering modes, dynamic-route blame and shell composition all work out of the box. Tracing bytes to a specific file needs source maps in the production build:
next.config.ts
Most projects do not have this on, so this is usually the difference between “this route is 2.8 MB” and packages/features/src/course/… is 340 kB of it”.
Without maps crust still reports every route total and the full shell analysis — it says the attribution is unavailable rather than guessing. Turn maps on in a dedicated analyze build if you would rather not ship them.

Next steps

Add the CI check

Budgets, a PR comment, and snapshot history on an orphan branch.

Run it in your app

A floating panel in your running app, gated out of production builds.