How to Prevent Flash of Incorrect Theme (FOUC) in SSR with Vike? #2312
-
I'm using Vike with SSR and experiencing a flash of the wrong theme before the correct one is applied. How can I ensure the theme is applied correctly on the first render to avoid this flash? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
brillout
Apr 5, 2025
Replies: 1 comment 13 replies
-
Seems to be more of a user-land question than a Vike related one? |
Beta Was this translation helpful? Give feedback.
13 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is an example of defining a
<script>
tag inside.vue
files: https://github.com/vikejs/vike-vue/blob/fed2f473e2eb1c33ea1943908737dd8bb1047359/examples/full/pages/images/Image.vueIs that the only workaround?
I'm more than open to implement
+script
but let's first do a thorough research on what workarounds there is around defining<script>
tags inside.vue
files. Up for the task?Can you publish a minimal reproduction? In the example above, using
useConfig()
works just fine.