Navigated to /docs/cli/build-and-preview

Build and preview

Validate generated routes, server output, static pages, code splitting, and bundle budgets before deployment.

Treat build as application validation

tavo build compiles client and server bundles, discovers pages, prerenders static routes, generates route types, and prints each route's render mode and JavaScript cost.

BASH
bashnpx tavo build --report-json
  • Client assets are written to .tavo/build/client.

  • The SSR entry is written to .tavo/build/server.

  • Route types and manifests are written to .tavo/generated.

  • The normalized report is written when --report-json is enabled.

Fail when JavaScript exceeds the contract

First-load and route budgets turn the build table into a CI guard. Start with limits based on the current product, then lower them deliberately as architecture improves.

BASH
bashnpx tavo build --max-first-load-js 150kb --max-route-js 40kb

Preview the output you will deploy

Use preview after the build to test production chunking and asset paths. Use SSR preview when validating hydration, loaders, actions, headers, static caching, or server failures.

BASH
bashnpx tavo preview
npx tavo preview --ssr
npx tavo preview --ssr --network