I'm not sure if this is an issue but it looks like...
# kobweb
a
I'm not sure if this is an issue but it looks like the JS code is being executed after the
index.html
on production mode, which loads light first (which is set in the generated
index.html
) and then switches to the User's Color mode (in my case Dark).
Issue reproduced within the Kobweb default app template but only in production mode and not in development.
Is this is the expected behavior?
It's more noticeable when running on the production server using production mode.
d
Yes, this is known. We are actually working on a fix for the color flash at the moment.
The idea that the html loads first and THEN the js runs is quite intentional, though. This is Kobweb's secret sauce for turning your SPA site into one that gets effectively crawled by search crawlers.
👍 1
a
A workaround is to use isExporting and show a different content or loading indicator without using JS in the
AppEntry
.
d
Sure but then you will kill SEO if you're not careful
Anyway just wait for a bit because we will be able to fix the color flash in a near future version
a
I noticed this isn't an issue in bitspittle.dev.
d
bitspittle.dev definitely flashes
If you want to see something fun, on Chrome, go into the devtools network tab and set throttling to 3G
👍 1
Then refresh the page on my blog