S
SolidJS7mo ago
Manuel

Vite + SSR, CSS not loading correctly

Hi, I'm trying to implement SSR with vite and solid.js. I followed this guide: https://vitejs.dev/guide/ssr and used this repository as example to follow: https://github.com/bluwy/create-vite-extra/tree/master/template-ssr-solid There seems to be an issue with hydration and css and I'm struggling with it. The setup is the same as the repository linked above, same server.js and same entry-client.jsx and entry-server.jsx just with my setup. My current code and website screen is in the attachments. I'm also receiving a lot of warns about hydration in console.
Vite
Next Generation Frontend Tooling
GitHub
create-vite-extra/template-ssr-solid at master · bluwy/create-vite-...
Extra Vite templates. Contribute to bluwy/create-vite-extra development by creating an account on GitHub.
1 Reply
Brendonovich
Brendonovich7mo ago
not sure if this will solve the problem but it's probably worth putting all those elements into one big component that you can share across renderToString and hydrate, at least then you know that your top-level elements match