Skip to main content

Server Side Rendering

Analog supports server-side rendering during development and building for production.

Enable SSR in the vite.config.ts using the analog() plugin:

import { defineConfig } from 'vite';
import analog from '@analogjs/platform';

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => ({
plugins: [analog({ ssr: true })],
}));