-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Make local classnames global #97
Conversation
Can you add a comment above explaining why you need this incantation, otherwise it'll be confusing when looking at this line in a few months |
Man, I know what we should do!
Write a custom lint rule against importing anything from import styles from './styles.css'; // should trigger our lint rule
import './styles.css'; // should be fine |
That actually sounds very reasonable! (also, that "Aha!" moment 👍) |
Let’s close this then. Would you like to write that rule? |
I've never written a rule and don't have the time to dig into that at the moment, so I'd rather somebody from the community does that! |
Fix Jest snapshot CSS Module class names, add CSS Module class name template as a configuration option. Closes facebook#106 and facebook#97.
This is the only way I've found to "disable" the
:local(.class)
notation.It disables it in the sense that the generated classname will just be
"class"
– it doesn't keep users from doing the webpack-specific thing though:That means it'll still break users builds if they for some reason rely on the above and we change to a different bundler.
Closes #90