-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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
Inconsistent CSS between dev and build #16723
Comments
Can you try next@canary? Many issues with CSS / ordering of CSS were solved recently. |
Can confirm, having an issue with styles not appearing in |
OP responded with 👍 to the comment above so closing as fixed. If anyone has new reproductions, please file a new issue. Check #16630 as a duplicate first! |
I'm having same issue with sass. I found one workaround here: https://medium.com/iryl/control-css-imports-order-for-next-js-webpack-based-production-applications-3b69765444fd. You import all .scss parts of your app into one main app by the order you want and everything should work fine. However my app is pretty big so i don't play to do that. I can confirm on 9.5.4-carnary.3 is not WOKRING properly |
I've used next v.10.0.6, and having the same. I can't find any solutions for this. |
Same here, same issue with Next V.10.0.7, sass: ^1.32.8 |
Using Next V 11.0.0 and having the same issue |
Saaaame Only hotfix i found out is to throw an |
@Timer Can we re-open or should we re-create a new issue ? |
Please open a new issue with a full reproduction. |
Bug report
Describe the bug
When using the "Built-in CSS support", the ordering of the CSS classes (and number of times a class is declared) is not consistent between development and production.
Because of this, you can see some CSS styling "pop" around when navigating between pages.
I believe the order is correct in SSR, but not in the client-side loaded bundles (as more CSS is loaded asynchronously, the ordering is lost and duplicated styles are loaded)
To Reproduce
Just run
next build
, the issue seems to be out-of-the-box with CSS modules?Expected behavior
The resulting CSS styles ordering should be identical between dev and prod.
Screenshots
Dev: (Desired behaviour):
Build: (Duplicated styles, inconsistent result:)
The text was updated successfully, but these errors were encountered: