Analog is a fullstack meta-framework for building applications and websites with Angular, powered by Vite.
SSR and SSG can be enabled 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, // enables server side rendering
static: true, // enables static site generation
prerender: { // configure routes to be rendered at build time
routes: async () => [
'/',
'/about',
'/blog',
'/blog/posts/2023-02-01-my-first-post',
],
},
})],
}));
Find more static site generators.