-
Notifications
You must be signed in to change notification settings - Fork 1
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
problem with global classes #35
Comments
Hello! Thanks for the task and suggestions, good point. I'll work with adding the |
I'm not sure this would be the best solution. Let's say I can make a list of such classes and pre-add them to "reservedNames". However, besides me, there may be other developers who are not know about using this tool. For example, in my case, an example would be adding a new locale. Such classes can also be added by external libraries, then the list of classes will generally be uncontrollable Therefore, the option of adding a prefix will probably be preferable for me personally. I'd rather get less savings, but more stability. |
One more thought: It seems you are fit in both before and after css modules loader. I'm not closely familiar with the webpack algorithms, but do you have the opportunity to analyze the use of |
So many useful points and ideas, thank you again! Yeap, I will add the ability to add a prefix, apparently for some situations this is mandatory. Then, after these updates, I will see if it's possible to analyze global classes |
So! I was looking for a way to analyze global classes and... No, this is not possible in the current package logic. The problem is that the package should check all files for the presence of global classes and only then start generating classes, but now the package does this on time for each file. In any case, I hope that current features will be enough for most cases. Thanks for the help! |
Hey!
First thank you for this package!
I got a problem: in addition to CSS modules, I use a small number of global classes. Specifically, the class of the current locale. These are short two letter classes. Minified classes began to overlap with them quite quickly.
Do you have any options to solve this problem?
I see two potential options:
provide the options to set a disallowlist of minified classes (rude and dangerous).
provide the option to set a prefix and/or postfix, for example, so that all minified classes begin with
_
.The text was updated successfully, but these errors were encountered: