[Bug] scss with Qwik starter and ssr is broken
See original GitHub issueQwik Version
v0.0.34
Operating System (or Browser)
macOs + Chrome
Node Version (if applicable)
No response
Which component is affected?
Qwik Rollup / Vite plugin
Expected Behaviour
scss styles loaded correctly
Actual Behaviour
npm init qwik@latest
- Choose Starter, Express and add Prettier
cd qwik-app
npm install
npm install sass
<-- UPDATE- add .mytitle { color: red; } inside global.css
- add
mytitle
class to h1 selector insideapp.tsx
- rename global.css to global.scss
- fix global.css import inside root.tsx
- run
npm run dev.ssr
andmytitle
class is not loaded
Additional Information
With npm run dev
is working correctly
Issue Analytics
- State:
- Created a year ago
- Comments:14 (10 by maintainers)
Top Results From Across the Web
Why We're Breaking Up with CSS-in-JS - DEV Community
Runtime CSS-in-JS libraries work by inserting new style rules when components render, and this is bad for performance on a fundamental level. 2 ......
Read more >Troubleshooting Common Errors - Gatsby
If you encounter a webpack error that says Generating SSR bundle failed after installing a plugin and trying to run gatsby develop or...
Read more >koa-web-kit: Versions | Openbase
Fix HMR broken(#22 ) and build error; ✂️Remove babelrc , only keep babel.config.js ... Add npm run dev:ssr script to quickly start SSR...
Read more >Optimize Largest Contentful Paint - web.dev
It's rare that a quick fix to a single part of a page will result in a ... Every single page can have...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s also a vite thing, but when using
useStyle$()
it’s good to import css or scss using?inline
like this:Otherwise vite will generate global styles, and extra .css files, in effect loading the css twice. Not very happy with this… but i cant find a better way in Vite yet
I don’t think it’s the right way. It’s not the wrong way either. Loading from the root.tsx should work, so I’m pretty sure this bug or something that should be documented if it’s not.
But at least we found a work-around so you can keep working. 👍