-
Notifications
You must be signed in to change notification settings - Fork 27.6k
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
Navigation breaks css module precedence #75525
Comments
@yyjhao Thank you for submitting an issue! Here's what I've found:
The |
interesting - so cssChunking: false is also buggy? is it something that we are not supposed to use? |
No, I think this behavior is intended if you opt out of the cssChunking algorithm.
Wouldn't this make it both always red since now the Card's styles override the CSS Modules? |
|
Link to the code that reproduces this issue
https://stackblitz.com/edit/stackblitz-starters-jsthdd4n?file=app%2Fpage.tsx
To Reproduce
Go to main page - notice that the square is blue
Click on other to navigate to another page with a red square
Navigate back with the link - notice that the square is now red
In addition, in prod build, the square is always red, which is incorrect. You can fix this by moving
import styles from './page.module.css';
to the top of the Page.tsx file, but it will break again with the same repro.Current vs. Expected behavior
The square should be blue and remain blue regardless of navigation.
Provide environment information
Which area(s) are affected? (Select all that apply)
CSS
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: