This happens because the initial load has the style9-generated CSS with a path that doesn't exist, and then the update re-renders the count with a function that imports the CSS with the correct name.
Look at the initial network load, it tries to load the CSS with the wrong name and fails. After that, it will load the CSS with the correct name, /@id/...
Which component is affected?
Qwik City (routing)
Describe the bug
In https://stackblitz.com/edit/qwik-style9?file=src%2Froutes%2Findex.tsx, you can see that in dev mode, the word
count
is white. Then when you click + or -, it will become blue or red depending on odd or even.This happens because the initial load has the style9-generated CSS with a path that doesn't exist, and then the update re-renders the count with a function that imports the CSS with the correct name.
What is going on, and how to fix it?
Reproduction
https://stackblitz.com/edit/qwik-style9?file=src%2Froutes%2Findex.tsx
Steps to reproduce
wait for dev mode to start, and click + or -
Look at the initial network load, it tries to load the CSS with the wrong name and fails. After that, it will load the CSS with the correct name,
/@id/...
System Info