Migrating an app in production to SSR

Post forum meteor:

Hey there !

I am trying to migrate an app currently in production to add SSR capacity.

It has been a long and painful process to get the informations needed from all around :smiley: But I am getting close.

I have isolated all my components wrapped in withTrackers so they don’t render on the server at all (I don’t have time to do better right now) and have finally managed to get the translations right without flickering on the client side. All that is now lacking, basically, is how to handle the CSS.

I have tried scotty boilerplate and it appears its CSS is rendered correctly server side without anything specific being done. And the little admin dashboard I built using it, had its css loaded fine on the server as well, even though I replaced stylus with react-semantic-ui.

So I assume something is wrong with the boilerplate or the config of our main app. We have been using pup (wasn’t involved in that choice, unfortunately), which I find a bit bloated, and the css package that comes with it, fourseven:scss. Works fine on the client, but I can’t get any css to display when rendering from server side.

Anyone have any idea on how to debug that ? I’m out of ideas that don’t involve changing the way we handle the css…

I may move soon to CDN delivery of everything, css included, so maybe it would be worth it for me to wait to be able to setup everything at once. It is my first time managing a production app, choices are tough sometimes :smiley:

Anyway, thanks for taking the time to read !

1 Like