
Foldkit 0.159.0
September 12, 2026 · Devin Jameson
Foldkit 0.159.0 is out. The main change is a portable fetch handler for server-rendered applications.
In 0.155.0, Foldkit moved the browser build, server build, and prerendering into one vite build. But the server build still asked you to choose a host entry: a Node HTTP process or a custom Worker.
@foldkit/vite-plugin 0.21.0 now builds a Web fetch handler. The same server module can run on Node or Workers:
foldkit({
buildId,
ssr: {
serverEntry: '/src/entry.server.ts',
build: true,
},
})Run vite build and the server output is dist/server/fetch.js, with a default export shaped as { fetch }. A Node host serves the built client assets and passes page requests to that handler. A Worker can default-export the same module.
This is a breaking change. Remove ssr.build.entry and keep ssr.serverEntry. Vite no longer builds your Node host. Use the SSR example's scripts/serve.ts as a reference, and start it with node scripts/serve.ts instead of node dist/server/main.js. Hosts importing dist/server/entry.server.js should import dist/server/fetch.js, which still exports renderPage.
The server rendering guide covers the build and host setup. New SSR projects from create-foldkit-app also pin @effect/platform-node-shared to their Effect version, so a fresh install cannot silently pick up an incompatible newer prerelease.
There are also several smaller updates:
OnInputandOnChangesupport contenteditable hosts, with newbeforeinputhandlers and Scene steps for editor interactions.OnKeyDownSelfandOnKeyDownSelfPreventDefaultignore key events that bubble up from children.CustomElement events decode their payloads against the declared Schema before dispatching a Message.
Domain and Route unions gain
matchOrElsefor handling selected variants with a shared fallback.Canceling a file picker inside a Dialog now keeps the Dialog open.
Dialog and form controls now require an explicit opt-in for
aria-describedby.Runtime.embedreports startup failures in the console.The DevTools MCP bin and oxlint plugin have smaller bundles built with Rolldown.
The Model preservation API uses live reload terminology, including the renamed
foldkit/model-preservationimport.A new anti-patterns guide covers common Foldkit mistakes and what to do instead.
The 0.159.0 release notes have more context and the migration steps for the breaking changes.
Thank you to @filipfalcon for the portable server bundle, the Rolldown migration, and documentation improvements. Thank you also to @artile for correcting the documentation snippets and UI overview, and to @armancharan for the Runtime.embed startup reporting fix!
Thanks to everyone building with Foldkit!
Devin