Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐞] weirdness with CSS import names in dev #4177

Closed
wmertens opened this issue May 12, 2023 · 2 comments
Closed

[🐞] weirdness with CSS import names in dev #4177

wmertens opened this issue May 12, 2023 · 2 comments
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working

Comments

@wmertens
Copy link
Member

wmertens commented May 12, 2023

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

  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 7.17.0 - /usr/local/bin/npm
  npmPackages:
    @builder.io/qwik: ^1.1.1 => 1.1.1 
    @builder.io/qwik-city: ^1.1.1 => 1.1.1 
    undici: ^5.22.1 => 5.22.1 
    vite: ^4.3.5 => 4.3.5
@wmertens wmertens added TYPE: bug Something isn't working STATUS-1: needs triage New issue which needs to be triaged labels May 12, 2023
@stackblitz
Copy link

stackblitz bot commented May 12, 2023

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@wmertens wmertens changed the title [🐞] weirdness with CSS import names [🐞] weirdness with CSS import names in dev May 12, 2023
@gioboa gioboa linked a pull request Jun 14, 2024 that will close this issue
@wmertens
Copy link
Member Author

unsure what's happening, but it seems to be a style9 vite plugin thing now in 1.8+. StyleX also doesn't actually work but that doesn't even try to load the CSS.

The original problem was that qwik processed files before style9/x could look at them, and that's fixed, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant