ssr (config)
Toggles server-side rendering for the whole app (universal vs SPA mode).
Syntax
ssr: boolean Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ssr | boolean | No | `true` (default) for universal SSR; `false` for client-only SPA where Nuxt ships an empty HTML shell. |
Returns
NuxtConfig — Determines the rendering mode at build time.
Examples
// Full SPA: no server rendering
export default defineNuxtConfig({
ssr: false,
})
// Universal (default) with per-route SPA via routeRules
export default defineNuxtConfig({
ssr: true,
routeRules: {
'/dashboard/**': { ssr: false },
},
})
Notes
Default is `true` (universal rendering). Set `false` for a pure SPA
(e.g. behind auth with no SEO needs). For mixed needs prefer keeping
`ssr: true` globally and disabling per route via `routeRules`. SPA
mode can still be statically hosted.