shavyg2 / slick-for-svelte

https://slick-for.com/svelte/docs/introduction
24 stars 1 forks source link

SSR support. #11

Open ansarizafar opened 5 years ago

ansarizafar commented 5 years ago

Is there any plan for server side rendering?

shavyg2 commented 5 years ago

I think about it, but it will be really hard to do

When people create their code, they are going to want to write client side code. They will include references to dom and other things. Problem 1.

Sapper gets around this by having 2 different execution script. However to have 2 different scripts it would likely be kinda messy

Now I could get around that with a decorator, however there will be all the imported node modules required for the server side, Eg someone imports bcrypt.

There really isn't a clean way to do this in javascript.

However a transpiler would work, you could cleanly separate the server side code from the Client side code.

If you want more details let me know.

But including another transpiler, I don't know about that.