dist/ directory you can deploy anywhere. This guide uses Cloudflare Workers, but the output works with any static host.
When to use this
Static deployment is ideal for:- Landing pages
- Marketing sites
- Documentation
- Any page where content doesn’t change per-request
Project structure
A static Vertz site has the same structure as any Vertz UI app:App entry
Yourapp.tsx exports the app component and SSR metadata — same as any Vertz app:
Client entry
The client entry hydrates the server-rendered HTML for interactivity:Dev server
For local development, use the standard Vertz dev server:Build script
The build script produces a self-containeddist/ directory. It:
- Builds the client JS bundle using
Bun.build()with the Vertz compiler plugin - Extracts CSS from component
css()calls - Copies public assets to
dist/public/ - SSR-renders the page by starting the dev server and capturing its output
- Strips dev-only scripts (HMR, WebSocket overlay, reload guard)
- Injects production head tags (meta, OG, fonts, client bundle reference)
The build script starts the dev server temporarily to SSR-render the page. This ensures the
production HTML matches exactly what you see in development — same components, same data, same
CSS. The dev server is killed immediately after the fetch.
Injecting meta tags
The build script is where you add production-only<head> content — meta descriptions, Open Graph tags, fonts, etc. Inject them after the <title> tag:
Wrangler configuration
Configure Cloudflare Workers to serve fromdist/:
not_found_handling = "single-page-application" setting returns index.html for any path that doesn’t match a file — this lets client-side routing work.
Package scripts
Deploy
dist/ directory:
How it differs from full-stack deployment
| Static site | Full-stack (Workers) | |
|---|---|---|
| Server | None — static files only | Cloudflare Worker with SSR |
| Data | Build-time only | Per-request (queries, auth) |
| Build output | dist/ with HTML + JS + CSS | dist/client/ + dist/server/ |
| Use case | Landing pages, marketing | Apps with dynamic data |
| Command | bun run build | vertz build |
SSG with generateParams
Pre-render dynamic routes at build time
OG Images
Generate Open Graph images for social sharing
SSR
Server-side rendering for dynamic apps