Hacker News new | past | comments | ask | show | jobs | submit login

Out of curiosity, how does SvelteKit differ from Sapper? I haven't been involved with Svelte for some time.

Looks cool by the way, I think Svelte is a really great product.




This blog post gives a bit more information on that: https://svelte.dev/blog/whats-the-deal-with-sveltekit, though the section on Snowpack is out of date. Basically, SvelteKit is serverless-first (whereas Sapper made you choose between a Node server and prerendered HTML), and because it's powered by Vite has a much nicer developer experience.

It also fixes a few of the rough design edges in Sapper. This migration guide gives you an idea of the scope of the changes: https://kit.svelte.dev/migrating


Hey Rich, is partial hydration on your roadmap for SvelteKit?


That's a Svelte issue rather than a SvelteKit issue. It's on our _radar_, though I don't know if I'd say it's on our _roadmap_ just yet


i would also like this. i recall Rich musing on some of the "hydrating unnecessary content" problems in this post https://dev.to/richharris/in-defense-of-the-modern-web-2nia so i imagine its on his mind. Elder.js solved it in a way, i'd love to see Rich's spin on it.


Oh, awesome, thanks for responding. Excited to give SvelteKit a try!


Check out the creator's first posts and videos of sveltekit when he introduced the alpha version: https://www.youtube.com/watch?v=qSfdtmcZ4d0

The way I understand it is it's an evolution of sapper to be more versatile, especially with respect to the backend. Out of the box it can work more easily with serverless providers that give you static file hosting + some kind of basic API gateway and serverless function platform. So you can write full stack client and server-side code all using the same framework (like you can with sapper). But the key difference from sapper is that you're not stuck using a node.js backend, with sveltekit you can swap in different backend implementations, like one targeting a serverless/lambda system.


yup pretty accurate. also faster dev-mode building with vite/esbuild.


I haven't used Sapper, but I've read a bit about SvelteKit. Afaik the main reasons for the rewrite were to clean up the code, and make the framework platform agnostic. This means that you can use different adapters for SvelteKit to make it usable in places where Sapper wasn't optimal, such as serverless hosts.

For more in depth info, refer to this page: https://kit.svelte.dev/migrating




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: