Flash of unstyled content in development mode
hanneskuettner opened this issue · comments
Versions
nuxt-vite: v0.0.37
nuxt: v2.15.0
Reproduction
Any project that uses CSS right now has a brief flash of unstyled content on every page load.
Every nuxt application with vite exhibits this behavior.
https://codesandbox.io/s/cool-babbage-ykif0
Description
The FOUC leads to very annoying developer experience and should be avoided if at all possible. It seems like it is a common problem with SSR in vite, see vitejs/vite#2013, vitejs/vite#2282.
Other SSR plugins for vite have solved this problem (brillout/vite-plugin-ssr#2) so it should be possible to solve.
what makes me think all the time is if the production version will also have the blink, even if only is a psychological thing because in production won't happen