#Flash of unstyled content when hosted

11 messages · Page 1 of 1 (latest)

hazy light
#

Whenever I host a TanStack Start app in a VPS using a dockerfile, and I visit a page I always get a flash where no single style is applied, then a split second later, the styling gets applied. This doesn't happen when I host on Vercel.

On Vercel, the only styling that doesn't get applied as soon as the page loads is the font. I get this issue on both the vinxi and devinxi (alpha) versions. Please, how do I fix this?

cyan whale
#

you dont have errors? how you are importing css and using vite?

hazy light
cyan whale
#

seems ok at first look, do you have any hydration warnings while testing?

kind pasture
#

I thin you need to set also the souce when importing tailwind

@import "tailwindcss" source("../");

or you will have hydration error

hazy light
cyan whale
#

try supress it to see if the error goes out, might be the case

hazy light
cyan whale
#

Im not sure why, probably a react internal thing, just add the suppressHydrationWarning to the html tag and let me know