Skip to content
Discussion options

You must be logged in to vote

Ah, but if you are seeing something like this on dev, then currently this is a way for remix to prevent FOUC during dev:

The first <style> is what remix calls "critical css" which are included in SSR to prevent FOUC, then other <style> is injected by vite using client js.
After the first HMR, the first <style> is removed by remix so that vite can take over css HMR. So I think having duplicate css on "initial SSR + initial client render" are not expected to cause any issue.

(But if you are observing inconsistent style potentially due to this, then I think that's worth a bug report).

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@hi-ogawa
Comment options

Answer selected by samadadi
@samadadi
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants