🍡 mochi
SSR framework for Svelte 5 + Bun with islands-based selective hydration
Custom HTML shell
Pass an HTML file path or template string to htmlShell. Use these placeholders:
| Placeholder | Replaced with |
|---|---|
{{mochi.head}} | <svelte:head> content |
{{mochi.css}} | Scoped component styles |
{{mochi.body}} | Rendered HTML |
| Hydration bootstrap <script> tag |
await Mochi.serve({
htmlShell: './src/shell.html',
routes,
});Custom placeholders can be injected via transformPageChunk in middleware.