Enabling incremental builds
There are three ways to opt in — pick whichever fits your workflow:- aero.config.ts
- aero build --incremental
- Environment variable
Set
incremental: true in your Aero config. During vite build, Aero will set AERO_INCREMENTAL automatically — but an explicit environment variable always takes precedence.What gets cached
After a successful incremental build, Aero writes two files under.aero/cache/ (not committed to version control):
build-manifest.json— Fingerprints of your client template tree, the Vite output manifest, static build options, per-file template hashes, and which routes map to which output files.content-collections.json— Per-markdown-file SHA-256 hash mapped to the parsed document after schema and transform. Invalidated whencontent.config.tschanges. Speeds up content loading on repeat builds when source files are unchanged.
build.emptyOutDir, so your dist/ folder is not wiped before each build and unchanged outputs can be reused.
When Aero skips or narrows the prerender
The behavior depends on whether your project has dynamic routes ([param].html style pages).
No dynamic routes
Aero checks three conditions against the stored manifest:- The hash of
dist/.vite/manifest.json(the Vite/Rolldown client build graph) - A fingerprint of every
*.htmlfile under your client directory (content and paths) - A hash of static build options Aero cares about (site URL and redirects config)
.html file. If no page depends on a changed template, nothing is written.
Dynamic routes present
If any page is a dynamic route ([slug].html style), getStaticPaths() must run every build. Whole-phase skip is disabled, and partial prerender is also disabled — the full prerender path runs.
Troubleshooting
SetAERO_LOG=debug to print prerender decisions and timings to the console:
When to disable incremental builds
Turn incremental builds off when you need a completely cleandist/ every time — for example, during reproducibility checks or when debugging stale output. Omit AERO_INCREMENTAL, or remove dist/ manually before running a standard pnpm build.