Closed pudo closed 1 year ago
I'm having an issue that might be related. Imports from module.s css files are fine, but importing a global sass file from a shared component library means that the styles aren't being loaded. It works fine in 13.1
Just adding for info: it works for pages dir, so seems like beta app dir specific issue.
Oh - I should be clear, for me it's not working with the pages dir
I've dug into this a bit more and found that it may be an ordering issue: the class generated by CSS modules has its instructions overridden by the UI framework that I use and am trying to customise. So this may come down to the ordering of the CSS being different when output. I'm just unsure how I can best address this, perhaps I'll need to find a new pattern for overwriting those rules....
We do have .module.scss
tests covered, the ordering issue will be fixed with #48244 I believe.
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true)
Link to the code that reproduces this issue
https://github.com/opensanctions/site/tree/main/styles
To Reproduce
Try to apply a module-based SCSS rule to an element using
className={styles.foo}
.Describe the Bug
When upgrading from Next 13.1.1 to 13.2.1 it seems that module-based SCSS rules stopped being generated in some way - the style of the elements reverts to the default styles specified in my global CSS file.
Expected Behavior
Being able to use
className={styles.foo}
to apply SCSS classes to an element.Which browser are you using? (if relevant)
Chrome evergreen
How are you deploying your application? (if relevant)
Vercel
NEXT-656