Documentation
Docs
Introduction
Getting Started
Tutorial: build an app
Core Concepts
Routing
Server-Side Rendering
Mimir, state management
Pages & Layouts
API Routes
Styling & Theming
Building & Deploying
API Reference
Guides
Recipes
FAQ (use cases)
The manifest
ekko build --client writes .ekko/build/manifest.json. It is the contract between the build and the
running server: the build says "here are the client chunks and how they relate", and the server uses it to
emit exactly the right <script type="module"> and <link rel="modulepreload"> tags per page. You rarely
read it by hand, but understanding it explains how SSR pages know which JavaScript to load.
Shape
Filenames are content-hashed (index-LNH6OYEF.js), so they can be served with a long immutable cache:
a change produces a new name, never a stale cache.
How the server uses it
readManifest() loads the JSON; you pass it to createApp({ manifest }). For each page, the server calls
resolvePageAssets(manifest, pageKey) which collects, in order:
- the hydrate entry (added to
modules+modulepreload) and its imports (preloaded), - global styles,
- the page's
file(the page chunk) and itsimports(preloaded) andcss, - the layout chunk and its imports (preloaded),
then deduplicates the preload list. The result feeds htmlShell(...), which renders:
modulepreload warms the chunks the page will import the instant hydration runs, so there is no waterfall.
The pageKey
When you register a route you pass meta.page (the page key, e.g. "index.tsx"). That is the key into
manifest.pages. scanRoutes("pages") returns this as r.pageKey, which is why the typical loop is:
If the key is missing from the manifest (you forgot to rebuild the client), the page still server-renders,
but it ships no hydration script, so it will not become interactive. The fix is always: ekko build --client.
Where it is served from
The build output under .ekko/build/client/ is mounted at /_ekko with maxAge: 31536000, immutable.
So pages/index-LNH6OYEF.js is fetched as /_ekko/pages/index-LNH6OYEF.js. You never reference these URLs
yourself; the manifest + server do.
Shipping it
.ekko/build/ is part of your app bundle. In production you build the client on your dev machine and
ship the .ekko/build folder, the prod box does not (and need not) rebuild client code. See
The build and Production deploy.
Next: project configuration, Configuration.