SPAs have clean separation between frontend and backend, but users see a white loading page or spinner while JavaScript loads and renders the initial UI. Next.js/SvelteKit solve the loading problem but require running your JavaScript stack in your frontend infrastructure. While services like Vercel hide this operational complexity (and they do it quite well), you're still coupling your frontend deployment to server infrastructure and adding another moving part to your system.
I wanted something in between, a clean separation like SPAs, but with something already loaded for users.
PrevelteKit pre-renders and hydrates your Svelte components at build time using jsdom, then serves them as pure HTML/CSS/JS files. During loading, users immediately see the layout and static content, while dynamic content takes another round-trip.
Key features:
* Static-first - No JavaScript runtime needed in production for the frontend * Minimalistic - Less than 500 lines of code, just glue for existing tools * Fast builds - Uses Rsbuild for rapid bundling (~hundreds of milliseconds with Rsbuild) * Deploy anywhere - Pure static files, no server required, deploy on GitHub Pages, S3, any web server
The concept is working well for my projects and I'm looking for feedback on the approach and whether others find this useful.