Re:How I made a website with Svelte
by sosodev on Saturday December 28, 2019 @01:47PM
(#21900792)
Is it? You either you need some kind of server side JavaScript rendering (pita to get right imo) or you need to create a complete copy of the website that’s statically rendered (and replaced if the user has JS enabled?)
[ Parent
| on HN ]
Re:How I made a website with Svelte
by _-___________-_ on Tuesday December 31, 2019 @08:41AM
(#21920908)
Have a look at Sapper, which is a framework built around Svelte that makes the server-side rendering pretty easy. I worked with a next.js SSR project recently and that was an absolute trainwreck, but Svelte/Sapper, while not perfect, is pretty nice.
You have to be a little careful about the interactions if you really care about it working with no JS (e.g. have an on:submit for a form and then also have a server-side route that it can POST to) but it's not too bad really.