Part 01 / Topic 6 of 9
Reading a next build route table
Run it for real against the harness's single page:
$ npm run build
> [email protected] build
> next build
▲ Next.js 16.4.6 (Turbopack)
✓ Running next.config.ts took 14ms
- Cache Components enabled
- Partial Prefetching enabled
Creating an optimized production build ...
✓ Compiled successfully in 407ms
Running TypeScript ...
Finished TypeScript in 700ms ...
Collecting page data using 5 workers ...
Generating static pages using 5 workers (4/4) in 223ms
Finalizing page optimization ...
Route (app)
┌ ○ /
└ ○ /_not-found
○ (Static) prerendered as static content
Both routes in this project are ○ (Static). /_not-found is not a file you wrote — Next.js generates it automatically for every project, as a fallback page for unmatched URLs.
| Symbol | Meaning | Seen in this course |
|---|---|---|
○ Static |
Pre-rendered once, at build time; every request gets the same HTML | This part — / has no per-request data |
ƒ Dynamic |
Rendered fresh per request, on the server | From Stage 2 onward, once a page reads request-specific data |
◐ Partial Prerender |
Part of the page is static, part streams in dynamically | Stage 2–3, once <Suspense> and Cache Components are in play |
Proof that ○ really means "rendered once, not per request": section 7's final homepage prints process.version inside the component. Grep the file next build actually produced:
$ grep -o "v22\.[0-9.]*" harness/.next/server/app/index.html
v22.23.2
That string is baked into harness/.next/server/app/index.html at build time. Confirm it stays frozen under next start, no rebuild in between:
$ npm run build && npm run start -p 3099
$ curl -sI http://localhost:3099/ | grep -i "x-nextjs"
x-nextjs-cache: HIT
x-nextjs-prerender: 1
x-nextjs-cache: HIT on the very first request is the proof: nothing ran on this request at all, Next.js just served the file section 6 found. A dynamic (ƒ) route would show no such header, because there would be nothing cached to hit. Stage 2 explains exactly why a Server Component's code can run at build time instead of request time — for now, treat ○ as "this is a fact about today's build, not about this particular request."
Done here? The practice set for Part 1 — including the solutions — is on the part page.