# Per-route render modes

Feature 9 of 14, in the group "Other features". Labels across 23 meta-frameworks: 19 1st-party, 0 Experimental, 0 Third-party, 4 Manual.

## What it is and why it matters

A render mode decides when a route's HTML is produced: at build time (static), per request (SSR), on the client (SPA), or revalidated on a schedule. A per-route switch lets a mostly static site keep one dynamic page without changing the whole app.

## Gotchas

- Static modes need an adapter that can serve prerendered output on the host you deploy to.

## Labels

| Framework | Label | Points |
| --- | --- | --- |
| [Next](https://framework-compare.vercel.app/frameworks/next.md) | 1st-party | 2 |
| [Nuxt](https://framework-compare.vercel.app/frameworks/nuxt.md) | 1st-party | 2 |
| [SvelteKit](https://framework-compare.vercel.app/frameworks/sveltekit.md) | 1st-party | 2 |
| [SolidStart](https://framework-compare.vercel.app/frameworks/solidstart.md) | 1st-party | 2 |
| [TanStack Start (React)](https://framework-compare.vercel.app/frameworks/tanstack-start-react.md) | 1st-party | 2 |
| [TanStack Start (Solid)](https://framework-compare.vercel.app/frameworks/tanstack-start-solid.md) | 1st-party | 2 |
| [Pracht](https://framework-compare.vercel.app/frameworks/pracht.md) | 1st-party | 2 |
| [Waku](https://framework-compare.vercel.app/frameworks/waku.md) | 1st-party | 2 |
| [Ember](https://framework-compare.vercel.app/frameworks/ember.md) | Manual | 0 |
| [Astro](https://framework-compare.vercel.app/frameworks/astro.md) | 1st-party | 2 |
| [React Router](https://framework-compare.vercel.app/frameworks/react-router.md) | 1st-party | 2 |
| [Qwik City](https://framework-compare.vercel.app/frameworks/qwik-city.md) | 1st-party | 2 |
| [Angular (SSR)](https://framework-compare.vercel.app/frameworks/angular.md) | 1st-party | 2 |
| [Marko](https://framework-compare.vercel.app/frameworks/marko.md) | Manual | 0 |
| [Fresh](https://framework-compare.vercel.app/frameworks/fresh.md) | Manual | 0 |
| [Analog](https://framework-compare.vercel.app/frameworks/analog.md) | 1st-party | 2 |
| [Vike](https://framework-compare.vercel.app/frameworks/vike.md) | 1st-party | 2 |
| [RedwoodSDK](https://framework-compare.vercel.app/frameworks/redwoodsdk.md) | 1st-party | 2 |
| [Remix 3](https://framework-compare.vercel.app/frameworks/remix.md) | Manual | 0 |
| [Void (React)](https://framework-compare.vercel.app/frameworks/void-react.md) | 1st-party | 2 |
| [Void (Vue)](https://framework-compare.vercel.app/frameworks/void-vue.md) | 1st-party | 2 |
| [Void (Svelte)](https://framework-compare.vercel.app/frameworks/void-svelte.md) | 1st-party | 2 |
| [Void (Solid)](https://framework-compare.vercel.app/frameworks/void-solid.md) | 1st-party | 2 |

## How to enable it in each framework

### Next

Label: **1st-party** (2 of 2 points).

Next documents stable per-route exports: without Cache Components, `dynamic` and `revalidate` ([previous-model guide](https://nextjs.org/docs/app/guides/caching-without-cache-components#route-segment-config)); with Cache Components, [`ensureStatic`](https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config/ensureStatic) (v16.4.0+; this port sets `ensureStatic = 'shell'` in the root layout) plus `'use cache'` boundaries (see [section 4](https://framework-compare.vercel.app/features/caching)). This port enables Cache Components, where `dynamic`, `revalidate`, `fetchCache`, and `dynamicParams` are removed ([route segment config](https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config)).

Example of building it yourself:

With `cacheComponents: true`, a layout or page exports `ensureStatic` to say how much of the route must be static. The port sets `'shell'` on the root layout, so the App Shell is prerendered and request-specific content streams in behind `<Suspense>`. `'navigation'` would require the whole route to be static.

```tsx
// app/layout.tsx
import { Suspense } from 'react'
// …
// Every route's App Shell (sidebar, header, Suspense fallbacks) must stay static;
// request-specific content streams in behind Suspense at prefetch/navigation time.
export const ensureStatic = 'shell'

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        <Suspense fallback={<HomeLinkFallback />}>
          <HomeLink />
        </Suspense>
        {children}
      </body>
    </html>
  )
}
```

Source: [Next.js: ensureStatic](https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config/ensureStatic)

Gotchas:

- With Cache Components on, the `dynamic`, `revalidate`, `fetchCache`, and `dynamicParams` exports are removed and `runtime` is unsupported; other segment config such as `maxDuration` and `ensureStatic` remains. Do not expect `export const dynamic` to work.

### Nuxt

Label: **1st-party** (2 of 2 points).

[`routeRules`](https://nuxt.com/docs/4.x/guide/concepts/rendering#hybrid-rendering): globs map to `prerender`, `swr`, `isr`, `ssr: false`, cache headers, redirects, and proxy rules.

```ts
export default defineNuxtConfig({
  routeRules: {
    '/admin/**': { ssr: false },
  },
})
```

*Adapted from [the rendering docs](https://nuxt.com/docs/4.x/guide/concepts/rendering#hybrid-rendering).* This port uses a header-only cache rule on `/**` (needed for `_payload.json` prefetch) and disables caching on `/api/**`, shown in [section 4](https://framework-compare.vercel.app/features/caching).

### SvelteKit

Label: **1st-party** (2 of 2 points).

Export `prerender`, `ssr`, and `csr` per route ([page options](https://svelte.dev/docs/kit/page-options)).

```ts
export const prerender = true;
export const ssr = false;
export const csr = false;
```

*From [the page options docs](https://svelte.dev/docs/kit/page-options) (each is a separate option; combine as needed).*

### SolidStart

Label: **1st-party** (2 of 2 points).

[Route prerendering](https://v1.solidjs.com/solid-start/v2/building-your-application/route-prerendering) is set under top-level `nitro: { prerender: { routes, crawlLinks } }` in v2/vite-plugin setups, and Nitro `routeRules` can set `swr`/`cache` per route (see the snippet in [section 4](https://framework-compare.vercel.app/features/caching)); there is no per-route SSR/SPA switch. For the Solid 2 stack, see [deployment](https://docs.solidjs.com/building-apps/deployment) (top-level `nitro` config) and [choose a rendering mode](https://docs.solidjs.com/guides/choose-a-rendering-mode) (`prerender-crawler`).

```ts
export default defineConfig({
  plugins: [solidStart(), nitro()],
  nitro: {
    prerender: {
      routes: ["/", "/about"],
    },
  },
});
```

*From the archived SolidStart v2 [route pre-rendering docs](https://v1.solidjs.com/solid-start/v2/building-your-application/route-prerendering) (uses `@solidjs/start`, not this port's `@solidjs/vite-plugin` setup).*

### TanStack Start (React)

Label: **1st-party** (2 of 2 points).

Per-route [`ssr: true | false | 'data-only'`](https://tanstack.com/start/latest/docs/framework/react/guide/selective-ssr) with a `defaultSsr`, plus a global [SPA mode](https://tanstack.com/start/latest/docs/framework/react/guide/spa-mode). Prerendering is configured in the plugin, and ISR is a headers pattern rather than a render mode.

```tsx
export const startInstance = createStart(() => ({
  defaultSsr: false,
}))
```

```tsx
export const Route = createFileRoute('/posts/$postId')({
  ssr: false,
  component: () => <div>This component is rendered on the client</div>,
})
```

*From [the selective SSR guide](https://tanstack.com/start/latest/docs/framework/react/guide/selective-ssr). The guide says `'data-only'` keeps `beforeLoad` and `loader` on the server while skipping server rendering of the component.*

Gotchas:

- `ssr: false` still runs on the client only; `'data-only'` is the middle option.

### TanStack Start (Solid)

Label: **1st-party** (2 of 2 points).

The same per-route [`ssr: true | false | 'data-only'`](https://tanstack.com/start/latest/docs/framework/solid/guide/selective-ssr), `defaultSsr`, and global SPA mode; the options match the React snippet.

```tsx
import { createStart } from '@tanstack/solid-start'

export const startInstance = createStart(() => ({
  defaultSsr: false,
}))
```

*From [the Solid selective SSR guide](https://tanstack.com/start/latest/docs/framework/solid/guide/selective-ssr); the per-route `ssr: false` example is the same as the React one.*

Gotchas:

- `ssr: false` still runs on the client only; `'data-only'` is the middle option.

### Pracht

Label: **1st-party** (2 of 2 points).

Set `render: "ssg" | "ssr" | "isg" | "spa"` per route in `src/routes.ts` ([rendering modes](https://pracht.resynapse.dev/docs/rendering)). Both routes in this port use `isg`.

```ts
route('/:id', './routes/book.tsx', {
  id: 'book',
  render: 'isg',
  revalidate: timeRevalidate(3600),
}),
```

*From this repo's `pracht-books/src/routes.ts` (`optimized` branch; `shell` omitted).*

### Waku

Label: **1st-party** (2 of 2 points).

Export a `getConfig` that returns `render: 'static' | 'dynamic'` per page, layout, or slice ([routing](https://waku.gg/#routing), [slices](https://waku.gg/#slices)).

```tsx
export const getConfig = async () => {
  return {
    render: 'dynamic',
  } as const;
};
```

*From this repo's `waku-books/src/pages/[id].tsx` (`optimized` branch).*

### Ember

Label: **Manual** (0 of 2 points).

SSR is app-wide in this port (`emberSsr()` from community `vite-ember-ssr`; official [FastBoot](https://github.com/ember-fastboot/ember-cli-fastboot) is also app-wide). `vite-ember-ssr` can additionally prerender a listed set of routes at build time (`emberSsg({ routes })`), a community build step (React Router's equivalent first-party `prerender` list is what earns its ✅); no first-party per-route render mode is documented, so nothing to enable.

Example of building it yourself:

Choose the mode per path in the port's request handler. Server-render the routes that need it. For the rest, return the unrendered template: the same SPA shell the port's Netlify and Cloudflare deploys serve.

```js
// server/handle-request.js
const CLIENT_ONLY = [/^\/account(\/|$)/]; // example: routes that skip SSR

export async function handleFetch(request, options = {}) {
  const url = new URL(request.url);
  // … /api/* handlers from the port …

  const template = await getTemplate();
  if (CLIENT_ONLY.some((re) => re.test(url.pathname))) {
    // SPA shell: app/entry.js boots the app in the browser
    return new Response(template, {
      headers: { 'content-type': 'text/html; charset=utf-8' },
    });
  }

  const emberApp = await getEmberApp();
  const rendered = await emberApp.renderRoute(`${url.pathname}${url.search}`, {
    settledTimeout: 8000,
  });
  return new Response(assembleHTML(template, rendered), {
    headers: { 'content-type': 'text/html; charset=utf-8' },
    status: rendered.statusCode,
  });
}
```

### Astro

Label: **1st-party** (2 of 2 points).

Default static; `export const prerender = false` per page/endpoint for on-demand rendering; with `output: 'server'`, `prerender = true` opts back in. On-demand pages need an adapter. ([on-demand-rendering](https://docs.astro.build/en/guides/on-demand-rendering/))

Example of building it yourself:

Pages prerender by default. `export const prerender = false` renders one page on demand; with `output: 'server'`, `prerender = true` opts a page back into static output.

```astro
---
// src/pages/[id].astro
export const prerender = false; // render on each request (needs an adapter)

const { id } = Astro.params;
---
<h1>Book {id}</h1>
```

Source: [Astro: On-demand rendering](https://docs.astro.build/en/guides/on-demand-rendering/)

### React Router

Label: **1st-party** (2 of 2 points).

`prerender` (stable config) takes a per-URL list, so listed paths are static while the rest are server-rendered (`ssr: true`) or served from the SPA fallback (`ssr: false`); `clientLoader` skips server data per route. `ssr` itself is global, with no per-route export; `ssr: "unstable_api-only"` is experimental (v8.5.0). ([rendering](https://reactrouter.com/start/framework/rendering), [pre-rendering](https://reactrouter.com/how-to/pre-rendering), [spa](https://reactrouter.com/how-to/spa))

Example of building it yourself:

List the URLs to prerender at build time. Those paths become static HTML, and every other path is server-rendered because `ssr` stays `true`.

```ts
// react-router.config.ts
import type { Config } from '@react-router/dev/config'

export default {
  // Can be omitted - defaults to true
  ssr: true,
  prerender: ['/', '/blog', '/blog/popular-post'],
} satisfies Config
```

Source: [React Router: Pre-Rendering](https://reactrouter.com/how-to/pre-rendering)

### Qwik City

Label: **1st-party** (2 of 2 points).

SSG and SSR can be mixed per route; dynamic routes export `onStaticGenerate`. No per-route options beyond that documented; the Cloudflare Pages adapter has `ssg` `include`/`exclude`. ([static-site-generation](https://qwik.dev/docs/guides/static-site-generation/), [cloudflare-pages](https://qwik.dev/docs/deployments/cloudflare-pages/))

Example of building it yourself:

A dynamic route that exports `onStaticGenerate` is prerendered for the params it returns. On Cloudflare Pages, the adapter's `ssg.include` and `ssg.exclude` choose which paths are static; the rest render on request.

```tsx
// src/routes/product/[id]/index.tsx
import { component$ } from '@builder.io/qwik'
import { useLocation, type StaticGenerateHandler } from '@builder.io/qwik-city'

export default component$(() => <p>Product {useLocation().params.id}</p>)

export const onStaticGenerate: StaticGenerateHandler = async () => {
  return { params: [{ id: '1' }, { id: '2' }] }
}
```

```ts
// adapters/cloudflare-pages/vite.config.ts
plugins: [
  cloudflarePagesAdapter({
    ssg: { include: ['/*'], exclude: ['/shop/*'], origin: 'https://example.com' },
  }),
],
```

Source: [Qwik: Static site generation](https://qwik.dev/docs/guides/static-site-generation/), [Qwik: Cloudflare Pages adapter](https://qwik.dev/docs/deployments/cloudflare-pages/)

### Angular (SSR)

Label: **1st-party** (2 of 2 points).

`ServerRoute[]` in `app.routes.server.ts` with `RenderMode.Server/Client/Prerender`; `getPrerenderParams`, `fallback`, per-route `headers`/`status`; `outputMode: "static"` for server-less builds. Stable since v20 per the [roadmap](https://angular.dev/roadmap) (developer preview in v19); the guide itself carries no stability label. ([ssr](https://angular.dev/guide/ssr))

Example of building it yourself:

Each route picks a render mode in `app.routes.server.ts`: per-request SSR, build-time prerender, or client-only.

```ts
// src/app/app.routes.server.ts
import { inject } from '@angular/core';
import { RenderMode, PrerenderFallback, ServerRoute } from '@angular/ssr';

export const serverRoutes: ServerRoute[] = [
  { path: '', renderMode: RenderMode.Server },
  { path: 'about', renderMode: RenderMode.Prerender },
  { path: 'account', renderMode: RenderMode.Client },
  {
    path: 'book/:id',
    renderMode: RenderMode.Prerender,
    fallback: PrerenderFallback.Server,
    async getPrerenderParams() {
      const ids = await inject(BooksApi).topIds();
      return ids.map((id) => ({ id }));
    },
  },
  { path: '**', renderMode: RenderMode.Server, status: 404 },
];
```

Source: [Angular: Server and hybrid rendering](https://angular.dev/guide/ssr)

### Marko

Label: **Manual** (0 of 2 points).

Marko Run documents streaming SSR; the static adapter is app-wide and `+meta.*` is static metadata only. No per-route render-mode switch documented. ([file-based-routing](https://markojs.com/docs/marko-run/file-based-routing), [adapters](https://markojs.com/docs/marko-run/adapters))

Example of building it yourself:

Every route still streams SSR. You tag a route with a mode in `+meta.json`, and the root middleware turns it into CDN Cache-Control. This adapts the port's `+middleware.ts`.

```ts
// src/routes/about/+meta.json   →  { "render": "static" }
// src/routes/+meta.json         →  { "render": "isr" }

// src/routes/+middleware.ts
const cacheControl: Record<string, string> = {
  static: "public, s-maxage=31536000",                // cached until redeploy
  isr: "public, s-maxage=60, stale-while-revalidate=86400",
};

export default Run.ALL(async (ctx, next) => {
  const res = await next();
  if (!res.headers.get("content-type")?.includes("text/html")) return res;
  const mode = (ctx.meta as { render?: string } | undefined)?.render;
  const headers = new Headers(res.headers);
  headers.set("Cache-Control", cacheControl[mode ?? ""] ?? "private, no-store"); // SSR
  return new Response(res.body, { status: res.status, statusText: res.statusText, headers });
});
```

Source: [Marko Run file-based routing (+meta, +middleware)](https://markojs.com/docs/marko-run/file-based-routing)

### Fresh

Label: **Manual** (0 of 2 points).

Pages render to HTML on the server; no per-route prerender/SPA/ISR option is documented (`RouteConfig` covers `routeOverride`, `skipAppWrapper`, `skipInheritedLayouts`, `csp` and `methods`; none selects a render mode). No first-party per-route render mode documented. ([architecture](https://usefresh.dev/docs/concepts/architecture), [routing](https://usefresh.dev/docs/concepts/routing), [file-routing](https://usefresh.dev/docs/concepts/file-routing))

Example of building it yourself:

Every route still renders on the server. You pick a mode per route with CDN Cache-Control headers in app middleware, adapting the port's `main.ts` middleware.

```ts
// main.ts
const modes: Record<string, string> = {
  "/about": "public, s-maxage=31536000",                    // "static": cached until redeploy
  "/": "public, s-maxage=60, stale-while-revalidate=86400", // "ISR": revalidate each minute
};

app.use(async (ctx) => {
  const res = await ctx.next();
  if (!res.headers.get("content-type")?.includes("text/html")) return res;
  const headers = new Headers(res.headers);
  headers.set("Cache-Control", modes[ctx.url.pathname] ?? "private, no-store"); // SSR
  return new Response(res.body, { status: res.status, statusText: res.statusText, headers });
});

app.fsRoutes();
```

Source: [Fresh data fetching (response headers)](https://usefresh.dev/docs/concepts/data-fetching)

### Analog

Label: **1st-party** (2 of 2 points).

SSR is the default; `routeRules: { '/admin/**': { ssr: false } }` in the Nitro config renders matching routes on the client only, and `prerender.routes` lists the routes built as static HTML. ([server-side-rendering](https://analogjs.org/docs/features/server/server-side-rendering), [static-site-generation](https://analogjs.org/docs/features/server/static-site-generation))

Example of building it yourself:

Pages render on the server by default. `routeRules` in the Nitro plugin makes matching routes client-only, and `prerender.routes` builds the listed routes as static HTML.

```ts
// vite.config.ts
import analog from '@analogjs/platform';
import angular from '@analogjs/vite-plugin-angular';
import nitro from '@analogjs/vite-plugin-nitro';
import { defineConfig } from 'vite';

export default defineConfig(() => ({
  plugins: [
    analog({ prerender: { routes: ['/', '/about'] } }), // static HTML
    angular(),
    nitro({
      routeRules: {
        '/admin/**': { ssr: false }, // client-only
      },
    }),
  ],
}));
```

Source: [Analog: Server-side rendering](https://analogjs.org/docs/features/server/server-side-rendering)

### Vike

Label: **1st-party** (2 of 2 points).

Per-page `ssr: false` (SPA) and `prerender: true | false` (SSG) in `+config.js`, inherited by every page under that directory; `stream` is per page too. ([ssr](https://vike.dev/ssr), [pre-rendering](https://vike.dev/pre-rendering), [stream](https://vike.dev/stream))

Example of building it yourself:

Put `ssr` and `prerender` in a directory's `+config`. The setting applies to every page under that directory.

```ts
// pages/+config.ts (all pages: SSR, pre-rendered)
export default { prerender: true }

// pages/admin/+config.ts (admin pages: SPA, not pre-rendered)
export default { ssr: false, prerender: false }

// pages/search/+config.ts (search: SSR on each request, streamed)
export default { prerender: false, stream: true }
```

Source: [Vike: ssr](https://vike.dev/ssr) · [Vike: Pre-rendering](https://vike.dev/pre-rendering) · [Vike: stream](https://vike.dev/stream)

### RedwoodSDK

Label: **1st-party** (2 of 2 points).

`render(Document, routes, { ssr: false })` renders a group of routes on the client only, and `{ rscPayload: false }` serves a group as static HTML with no hydration. No build-time prerender documented. ([sdk-router](https://docs.rwsdk.com/reference/sdk-router))

Example of building it yourself:

Pass options as the third argument to `render()`. `rscPayload: false` serves a group as static HTML with no hydration, and `ssr: false` renders client components only in the browser.

```tsx
// src/worker.tsx
import { defineApp } from "rwsdk/worker";
import { render, prefix } from "rwsdk/router";
import { ReactDocument, StaticDocument } from "@/app/Document";

export default defineApp([
  // Default: SSR with the RSC payload, so the page hydrates
  render(ReactDocument, [prefix("/app", appRoutes)]),
  // Static HTML, no hydration (StaticDocument has no client script)
  render(StaticDocument, [prefix("/docs", docsRoutes)], { rscPayload: false }),
  // Client components render only in the browser
  render(ReactDocument, [prefix("/spa", spaRoutes)], { ssr: false }),
]);
```

Source: [RedwoodSDK: sdk/router](https://docs.rwsdk.com/reference/sdk-router)

### Remix 3

Label: **Manual** (0 of 2 points).

Routes render on the server per request. `remix/spa` runs a whole app as a client-rendered app; no per-route prerender or SPA switch is documented. ([spa](https://docs.remix.run/api/spa/), [request-handling](https://docs.remix.run/request-handling/))

Example of building it yourself:

Every route renders per request. To serve one page as static HTML, render it once at startup with `renderToString()` and return the stored string from that route.

```tsx
// app/router.ts
import { renderToString } from "remix/component/server";
import { render } from "remix/middleware/render";
import { createHtmlResponse } from "remix/response/html";
import { createRouter } from "remix/router";
import { assets } from "./assets.ts";
import { AboutPage } from "./actions/about-page.tsx";

// rendered once, when the server starts
const aboutHtml = await renderToString(<AboutPage />);

export const router = createRouter({ middleware: [render({ assets })] });

router.get("/about", () =>
  createHtmlResponse(aboutHtml, { headers: { "Cache-Control": "public, max-age=3600" } }),
);
// all other routes: context.render(...) on each request
```

Source: [Remix: Streaming UI with frames, render the response as a stream](https://docs.remix.run/streaming-ui-with-frames/#server-rendering-with-rendertostream-and-rendertostring)

### Void (React)

Label: **1st-party** (2 of 2 points).

Per-page `ssr = false` (client-mounted shell, loader still runs), `prerender = true | false`, and `revalidate = <seconds>` exports in the `.server.ts` companion. App-wide `output: "static"` flips the prerender default, and island and Markdown pages are a further static mode. ([overview](https://void.cloud/guide/pages-routing/overview), [ssg](https://void.cloud/guide/ssg), [revalidation](https://void.cloud/guide/edge/revalidation))

Example of building it yourself:

Pages render on each request by default. A page's `.server.ts` can turn off SSR or prerender it, and `output: 'static'` in `void.config.ts` prerenders every page unless it opts out.

```ts
// pages/account.server.ts: rendered in the browser only; the loader still runs on the server
export const ssr = false
```

```ts
// pages/about.server.ts: built to HTML (deploy-time on Cloudflare, build-time with output: 'static')
export const prerender = true
```

Source: [Void: Pages routing](https://void.cloud/guide/pages-routing/overview) · [Void: Static sites](https://void.cloud/guide/ssg) · [Void: Prerendering](https://void.cloud/guide/edge/prerendering)

Gotchas:

- With `output: 'static'` on `target: 'node'` (1.12.2), the prerendered HTML is written to `dist/client`, but the Node server renders those pages again on every request. The local ports needed middleware to serve the files.

### Void (Vue)

Label: **1st-party** (2 of 2 points).

Per-page `ssr = false` (client-mounted shell, loader still runs), `prerender = true | false`, and `revalidate = <seconds>` exports in the `.server.ts` companion. App-wide `output: "static"` flips the prerender default, and island and Markdown pages are a further static mode. ([overview](https://void.cloud/guide/pages-routing/overview), [ssg](https://void.cloud/guide/ssg), [revalidation](https://void.cloud/guide/edge/revalidation))

Example of building it yourself:

Pages render on each request by default. A page's `.server.ts` can turn off SSR or prerender it, and `output: 'static'` in `void.config.ts` prerenders every page unless it opts out.

```ts
// pages/account.server.ts: rendered in the browser only; the loader still runs on the server
export const ssr = false
```

```ts
// pages/about.server.ts: built to HTML (deploy-time on Cloudflare, build-time with output: 'static')
export const prerender = true
```

Source: [Void: Pages routing](https://void.cloud/guide/pages-routing/overview) · [Void: Static sites](https://void.cloud/guide/ssg) · [Void: Prerendering](https://void.cloud/guide/edge/prerendering)

Gotchas:

- With `output: 'static'` on `target: 'node'` (1.12.2), the prerendered HTML is written to `dist/client`, but the Node server renders those pages again on every request. The local ports needed middleware to serve the files.

### Void (Svelte)

Label: **1st-party** (2 of 2 points).

Per-page `ssr = false` (client-mounted shell, loader still runs), `prerender = true | false`, and `revalidate = <seconds>` exports in the `.server.ts` companion. App-wide `output: "static"` flips the prerender default, and island and Markdown pages are a further static mode. ([overview](https://void.cloud/guide/pages-routing/overview), [ssg](https://void.cloud/guide/ssg), [revalidation](https://void.cloud/guide/edge/revalidation))

Example of building it yourself:

Pages render on each request by default. A page's `.server.ts` can turn off SSR or prerender it, and `output: 'static'` in `void.config.ts` prerenders every page unless it opts out.

```ts
// pages/account.server.ts: rendered in the browser only; the loader still runs on the server
export const ssr = false
```

```ts
// pages/about.server.ts: built to HTML (deploy-time on Cloudflare, build-time with output: 'static')
export const prerender = true
```

Source: [Void: Pages routing](https://void.cloud/guide/pages-routing/overview) · [Void: Static sites](https://void.cloud/guide/ssg) · [Void: Prerendering](https://void.cloud/guide/edge/prerendering)

Gotchas:

- With `output: 'static'` on `target: 'node'` (1.12.2), the prerendered HTML is written to `dist/client`, but the Node server renders those pages again on every request. The local ports needed middleware to serve the files.

### Void (Solid)

Label: **1st-party** (2 of 2 points).

Per-page `ssr = false` (client-mounted shell, loader still runs), `prerender = true | false`, and `revalidate = <seconds>` exports in the `.server.ts` companion. App-wide `output: "static"` flips the prerender default, and island and Markdown pages are a further static mode. ([overview](https://void.cloud/guide/pages-routing/overview), [ssg](https://void.cloud/guide/ssg), [revalidation](https://void.cloud/guide/edge/revalidation))

Example of building it yourself:

Pages render on each request by default. A page's `.server.ts` can turn off SSR or prerender it, and `output: 'static'` in `void.config.ts` prerenders every page unless it opts out.

```ts
// pages/account.server.ts: rendered in the browser only; the loader still runs on the server
export const ssr = false
```

```ts
// pages/about.server.ts: built to HTML (deploy-time on Cloudflare, build-time with output: 'static')
export const prerender = true
```

Source: [Void: Pages routing](https://void.cloud/guide/pages-routing/overview) · [Void: Static sites](https://void.cloud/guide/ssg) · [Void: Prerendering](https://void.cloud/guide/edge/prerendering)

Gotchas:

- With `output: 'static'` on `target: 'node'` (1.12.2), the prerendered HTML is written to `dist/client`, but the Node server renders those pages again on every request. The local ports needed middleware to serve the files.

---

HTML version: https://framework-compare.vercel.app/features/render-modes · All pages: https://framework-compare.vercel.app/llms.txt · Data: https://framework-compare.vercel.app/api/index.json
