← Glossary

Static Export

Pre-rendering an entire app to plain HTML/CSS/JS at build time so any static host can serve it without a runtime.

Static export means generating every page of your app as a flat HTML file at build time. The output goes into a folder (usually `out/` or `dist/`) that any static host can upload. No Node server, no functions, no runtime cost. In Next.js, you enable this with `output: "export"` in next.config. The trade-off: dynamic features that need a server at request time stop working. No API routes. No middleware. No on-demand Image Optimization. Server Components compile to static. When static export is enough: docs sites, marketing pages, blogs, calculators, dashboards with client-fetched data. When it is not enough: anything needing fresh server-side data per request, server-side auth, or background jobs. The advantage is hosting flexibility. A static export runs on GitHub Pages, Cloudflare Pages, S3, any CDN, or even a USB stick. Hosting cost approaches zero. Build cost is upfront and one-time per deploy. For most indie projects, static export plus a separate API somewhere (a small Worker, a Supabase function) is cheaper and simpler than running a full SSR app. The Vercel-default mental model of "everything is dynamic" wastes money on small projects that didn't need it.

Related tools