Skip to content

How to Prevent Flash of Incorrect Theme (FOUC) in SSR with Vike? #2312

Closed Answered by brillout
abdrahmanrizk asked this question in Help & Questions
Discussion options

You must be logged in to vote

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.vue

Is 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?

Following error was thrown by the onRenderHtml() hook defined at vike-vue/__internal/integration/onRenderHtml
Error: Using useConfig() with HTML streaming isn't supported yet

Can you publish a minimal reproduction? In the example above, using useConfig() works just fine.

Replies: 1 comment 13 replies

Comment options

You must be logged in to vote
13 replies
@abdrahmanrizk
Comment options

@brillout
Comment options

@abdrahmanrizk
Comment options

@brillout
Comment options

Answer selected by abdrahmanrizk
@abdrahmanrizk
Comment options

@brillout
Comment options

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