This example demonstrates how to build pre-rendered, CDN-ready static websites with Ranu.js.
- Static render mode: Setting
export const render = 'static'instructs the compiler to pre-render the route into standalone HTML files (.ranu/build/static/pages/*.html) - Zero-compute serving: Output static pages require no Node.js execution at runtime, enabling instant time-to-first-byte (TTFB)
├── app/
│ ├── about/
│ │ └── page.tsx # export const render = 'static'
│ ├── layout.tsx # Shared root layout
│ ├── page.tsx # Static home page
│ └── pricing/
│ └── page.tsx # export const render = 'static'
├── package.json
├── ranu.config.ts
└── tsconfig.json
pnpm devBuild and inspect the pre-rendered HTML in .ranu/build/static/:
pnpm build