woutdp / live_svelte

Svelte inside Phoenix LiveView with seamless end-to-end reactivity
https://hexdocs.pm/live_svelte
MIT License
1.2k stars 46 forks source link

SvelteKit and Skeleton #89

Closed nfplay closed 11 months ago

nfplay commented 11 months ago

Hi, it's not clear to me if LiveSvelte supports both SvelteKit and Skeleton (v2). Can you shed a light on this?

Thanks! Nuno

woutdp commented 11 months ago

It does not support SvelteKit.

Skeleton might be supported although I haven't tried it out myself. From what I've heard skeleton doesn't support Svelte without SvelteKit very well but that's definitely something to investigate further :)

nfplay commented 11 months ago

Thanks for the fast response!

Concerning SvelteKit support, and in projects where SSR is not needed, what are the constraints of supporting it?

Going all in with LiveSvelte, it's a bit of a downside this lack of support, specially when it starts affecting other frameworks (like Skeleton). Is it something really impossible, or do you think it's feasible but with an extra pair of hands?

Thanks, Nuno

woutdp commented 11 months ago

I'm not sure how it would work. Sveltekit is really a metaframework around Svelte for building full stack web apps, while live_svelte is more of an additive layer on top of Phoenix (LiveView and non LiveView).

It'd be open to it though if that means better support, just don't see how it would technically all work together. I guess you could generate static files and then use these in live_svelte. But those static files would technically be 'pages' in SvelteKit, so if you just need a component, you'd need to create a page for each component, which is doable but seems it's not really using SvelteKit in the correct way.

So I wouldn't say it's impossible, I'm not against it if someone makes something that makes sense and that brings better support.