Skip to content

v0.6.0

Choose a tag to compare

@tanmaymishu tanmaymishu released this 31 Oct 08:54
· 5 commits to main since this release

lemmego dev runs the standalone Inertia renderer when there is a bundle for it, which takes server-side rendering out of the Go reload loop.

What changed

  • When bootstrap/ssr/ssr.js exists, dev starts it and points the application at it through INERTIA_SSR_URL, which air passes down to the binary it spawns. That renderer serves a bundle finished before it started, so there is no warm-up and rebuilding the Go binary does not touch it.
  • Without a bundle nothing changes, and dev says in one line that the first render will be slow and what to run once to fix it.
  • The scaffold pins inertia v0.5.0 (from v0.3.0), which the above needs: before it, the address was read and then overridden on every render by the Vite hot file.

Why

Rendering through the Vite dev server means Vite transforms the SSR module graph on demand. Measured on a real application, the first render after Vite starts took 17–25 seconds — and because strict SSR is on outside production, that was reported as a broken renderer rather than a slow one. Through the standalone renderer the same first request measured 0.236s.

The cost, which dev prints rather than buries

That bundle is only as current as the last vite build --ssr. A component change reaches the browser over HMR and the server-rendered document only after a rebuild.

Scaffold version 2.24.0.