docs / Runtime

Deployment

One SSR function + one client bundle, platform targets, the Node server, SSR rendering rules, and the browser bundle.

Vesk builds one SSR function and one client bundle; how they are served depends on the target platform. The default is a standard Node.js server; `vesk build --platform <name>` switches the output shape.

Platforms

terminal
									
										type Platform = 'node' | 'vercel' | 'netlify' | 'cloudflare' | 'deno' | 'aws' | 'edge' | 'coxmos'
									
								
  • Detection order: explicit `--platform` override, then well-known CI env (e.g. DENO_DEPLOYMENT_ID → deno), then `node`.
  • Node: `vesk start` serves the `.vesk/` build with startProdServer (default port 3000).

SSR rendering

  • Rendered server-side: static HTML, dynamic interpolation, conditionals, .map()/for lists, child component HTML, {#server} blocks, styles.
  • Not rendered server-side: event-handler attributes (on* — client-only) and {#client} blocks (stripped).
  • Tracked state renders its initial value; reactivity is client-side.
  • All dynamic text content is escaped with `escapeHtml()` (XSS-safe); static attribute values from source are trusted.

Browser

The client bundle is built from the compiled client codegen plus the runtime's index-client barrel, tree-shaken to the exports actually used, with hydration entry points (hydrate, hydrateViewport, hydrateIdle, hydrateOnInteraction, needsHydration, createHydrateWalker, collectVskMarkers, reactiveProps).