Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Flash of unstyled content in development mode #133

Closed
hanneskuettner opened this issue May 6, 2021 · 1 comment · Fixed by #195
Closed

Flash of unstyled content in development mode #133

hanneskuettner opened this issue May 6, 2021 · 1 comment · Fixed by #195
Assignees
Labels
bug Something isn't working

Comments

@hanneskuettner
Copy link

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 (vikejs/vike#2) so it should be possible to solve.

@hanneskuettner hanneskuettner added the bug Something isn't working label May 6, 2021
@ctwhome
Copy link

ctwhome commented Jun 30, 2021

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

@antfu antfu self-assigned this Aug 31, 2021
antfu added a commit that referenced this issue Sep 6, 2021
@pi0 pi0 closed this as completed in #195 Sep 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants