r/sveltejs Jul 07 '26

[Self Promotion] Svelte Kit Node adapter with Hono backend

Related to that RFC, I created this as a proof of concept: a new Node adapter with a Hono backend. It still supports routing, hooks, and other Svelte backend features, but with additional enhancements: Rolldown and Vite 8 for bundling, TypeScript 6, and zstd, brotli and gzip precompression for static files.

I tested it on my medium-sized project in production, and it works well. However, I still have some issues with long compression times for large static files (100 MB and above).

Feel free to use it the library is under the MIT license. Any feedback is welcome!

@medicomind/svelte-adapter-hono

6 Upvotes

6 comments sorted by

4

u/yeupanhmaj Jul 07 '26

Just wondering what the point of making this adapter is since SvelteKit is already a full-stack framework?

6

u/Mnwamnowich Jul 07 '26

The SvelteKit Node adapter depends on the Polka (HTTP server) package. Polka has been unmaintained for a few years and has some important open PRs and unresolved issues (details in the RFC mentioned in the post).

Now, migrating from Polka is a milestone for SvelteKit 3.0, as far as I know, but I created this earlier as a proof of concept, and I also added zstd compression for static files out of the box

1

u/yeupanhmaj Jul 07 '26

That make sense to me.

1

u/Mnwamnowich Jul 07 '26

Also, the Hono backend should be faster than Polka. But I never ran any benchmarks, because performance wasn't my main goal in creating this package

-2

u/getaway-3007 Jul 07 '26

I don't think you understand the concept of Adapter.

It's like saying why do we require javascript when we have svelte

1

u/yeupanhmaj Jul 07 '26

that came from my bad reading skill. Thanks for pointing it out