News for hackers. Stuff that matters.
Re:Astro: Ship Less JavaScript by miltonsopus on Tuesday June 08, 2021 @06:59PM (#27442183)
Yes, with SvelteKit you can use the static adapter to generate static html files for your routes. It's also possible to control this on a page by page basis.
Re:Astro: Ship Less JavaScript by dasb on Tuesday June 08, 2021 @07:01PM (#27442205)
Thanks.

What if only some components in my page require Javascript? Can the same "partial hydration" be achieved?

Re:Astro: Ship Less JavaScript by MatthewPhillips on Tuesday June 08, 2021 @09:42PM (#27443288)
No. Svelte are big proponents of the SPA pattern so I'm doubtful they would ever build something like this.
Re:Astro: Ship Less JavaScript by jiofih on Tuesday June 08, 2021 @11:10PM (#27443808)
Svelte by its nature only generates JS for the dynamic pieces of the page, if you’re using SSR it’s already “partially hydrated”.

Vue3 can also ignore static parts which gives similar benefits.