hello (new) world
Drop a .svelte file in a Hono Worker.
That's it.
Real Svelte 5. Real SSR. Real hydration. No SvelteKit, no Vite, no scaffolding. Just one middleware, one route helper, one build step.
npm i svelte-hono hono svelte
The whole worker
import { Hono } from "hono";
import { svelteRenderer, attachSvelteRoutes } from "svelte-hono";
import { bundles } from "./bundles.generated";
import Hello from "./hello.svelte";
const app = new Hono();
attachSvelteRoutes(app, { bundles });
app.get(
"/",
svelteRenderer(Hello, {
hydrateAs: "hello",
title: "Hello",
props: { initialCount: 0 },
}),
);
export default app; This page is the receipt โ you're reading it. The site you're on is built with svelte-hono. Why this exists โ
What you get
- SSR first paint. The HTML is real, server-rendered Svelte. No blank flash.
- Hydration after. Click handlers,
$state,$effectall work. - One build step.
buildHonoSvelte()handles both passes. - Shared runtime. Svelte's ~103 KB client runtime ships once across every component on your site. Per-component bundles are 1โ16 KB, not 45โ70 KB. Linear scaling stops being a tax.
- Deploy-safe by default. HTML revalidates every request โ new deploys visible everywhere instantly. Static bundles ship as content-hashed and immutable.
- Cloudflare Workers native. No
eval, nonew Function, no codegen. - ~5 KB library + your component bundle.