-
-
Notifications
You must be signed in to change notification settings - Fork 609
CSS Modules Naming #157
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
Comments
Nevermind... somehow missed |
ping... |
you can pass |
Doesn't seem to be working, and I don't see any mention of context in the documentation... |
yep, you're right. Sorry. It's missing here: https://github.com/webpack/css-loader/blob/master/lib/processCss.js#L152 |
So is it not implemented? I'm not familiar with what that code is doing so I'm not sure what you're showing me. If it isn't implemented, can you implement it? Otherwise, can you give me an example how you can configure it to use the context? |
I actually read through the code more and figured out how to do it without the query: {
module: {
loaders: [...]
},
output: {...},
plugins: [...],
devtool: 'source-map',
context: ABS_PATH // <- Add it here
} This then applies to everything, not just the CSS, but that shouldn't be an issue. It's nice to have the option that you now added, though. Thanks. |
|
CSS Loader creates its class names simply with some sort of hash.
The CSS Modules spec actually uses
.folder_file_className_h45H
or something similar when attempting to make unique class names. This is preferable since it is now easier to determine what the class is and where it comes from instead of guessing or following an odd rabbit trail to figure it out.Are there plans to start using the CSS Modules spec for this, or at least give us the option to use it? Can there be?
The text was updated successfully, but these errors were encountered: