next build
The Next.js command that compiles the app for production and pre-renders every route it can.
In more detail
Its output lists each route with a symbol: an empty circle for static, a filled circle for pages pre-rendered with generateStaticParams, and ƒ for dynamic routes rendered on demand. Results go into the .next folder.
Example
npx next buildRelated terms
- next start — The Next.js command that runs a production server from the output of next build.
- static rendering — Rendering a page to HTML once, at build time or on a schedule, and serving that same result to every visitor.
- .next directory — The folder where next build writes its output: compiled server code, static assets in .next/static and, if enabled, .next/standalone.
Taught in
- Dynamic Routes: Slugs & generateStaticParams — Next.js 15 & Modern App Router Architecture
- Full Route Cache: Static Rendering & Segment Config — Next.js 15 & Modern App Router Architecture
- Containerized Deployment: Multi-Stage Docker Builds — Next.js 15 & Modern App Router Architecture