The output rule (Astro 5)
Astro 5 has TWO output modes: output: 'static' (the default — bake HTML at
build time) and output: 'server' (render fresh per request).
output: 'hybrid' was removed in Astro 5 — the old hybrid behavior is now just
'static' with a per-route export const prerender = false.
Either way, a route's prerender export wins over the mode default: true → built at build time,
false → rendered on demand. Any on-demand route needs a server adapter and a host that runs JS.
Request-flow explorer — pick an output mode + a route
Choose an output mode and what the route exports, then watch which lane actually produces the HTML.
The lane that lights up is where your HTML is born — the other is skipped.
1. output mode (astro.config.mjs)
2. this route's prerender export
Route frontmatter
Verdict
—
—
The 4 official server adapters
On-demand rendering needs a runtime that runs your code. Add one with npx astro add <name> —
it installs the adapter and wires adapter: in astro.config.mjs. Pure-static sites need none.
Comparison — output mode × prerender → when rendered → adapter?
prerender override.
Cross-refs:
🔗 astro_islands (what gets shipped to the browser) ·
🔗 astro_content_collections (typed content for static routes) ·
🔗 metaframework_landscape (where Astro sits vs Next/Remix).