News for hackers. Stuff that matters.
Re:How I made a website with Svelte by deltron3030 on Saturday December 28, 2019 @12:11PM (#21900071)
I dig the simplicity, but why didn't you use Sapper?

https://sapper.svelte.dev/

(Next.js/Nuxt pendant based on Svelte, can also be used as static site generator).

Re:How I made a website with Svelte by bwblabs on Saturday December 28, 2019 @07:40PM (#21902956)
Sapper is very useful and has quite some nice properties:

- automatic SSR (Server Side Rendering)

- possibility to export to server-less plain HTML/CSS/JS

- option to resource preload/fetching on mouseover/touchstart (a headstart of 300+ms)

- serviceworker cache: PWA, offline support, etc.

- session stores

Sure there is room for improvement (e.g. i18n), but it very useful and powerful already today.

Re:How I made a website with Svelte by Wolfr_ on Saturday December 28, 2019 @01:54PM (#21900847)
I used Sapper before, I quite like it.

But now I wanted to explore how one would build something like Sapper, this is why I went for base Svelte and then added a router. I now have pretty much what I used Sapper for and the setup is simpler.

Also, Sapper doesn't seem to be in active development.

Re:How I made a website with Svelte by deltron3030 on Saturday December 28, 2019 @03:05PM (#21901387)
Fair enough. I'm dabbling with Svelte/Sapper myself but I'm not at a point where I could roll my own with SSR and all that. Still trying out different ways to build components, gravitating towards having a fat global.css file and keeping the components themselves as thin as possible.

>Also, Sapper doesn't seem to be in active development.

For three months or so, but I wouldn't worry about that, because just a thin layer on top of Svelte, and the maintainer is very active in the Svelte repo it seems. It may only get bumps if something breaks.