arktosk / vue-jss-plugin

JSS plugin implementation for Vue.js
MIT License
24 stars 1 forks source link

Nuxtjs SSR #24

Open Rekwian opened 4 years ago

Rekwian commented 4 years ago

Hi,

I use NuxtJs for its SSR and i tried your plugin with it, but not working because the ssr try to load $classes before the component are mounted . It gets "undefined" (and gets hided error: str.replace is not a function).

Do you have an idea to get around about this problem ? And do you think you can resolve this in the future ?

i love Jss and i think your project is really excellent but i'm sad not to be able to use it. 😢

arktosk commented 4 years ago

Hi @Rekwian,

Unfortunately SSR is not implemented yet, but JSS has very promising API for rendering style sheets on server side. And in the future I would like to add that capacity to the plugin but for now it isn't priority because client side part still have some issues and I want to deal with these first.

However, adding some conditional to the function that calculates classes names should allow to use the plugin with SSR, but of course without rendering CSS by server. Currently I don't have much time to develop the plugin, but I will be very glad if you have some time for contribution to the project, and add it by yourself.