You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The loader emits an error for each CSS file: The "modules.namedExport" option requires the "modules.exportLocalsConvention" option to be "camelCaseOnly".
I understand that class names mustn't contain dashes and many other characters to be able to be constant names, but underscore (_) is allowed and I want to use it in constant names.
In order to achieve this, there can be a value like leaveUnderscore for the exportLocalsConvention option that shall camelize everything except underscores and be accepted when namedExports is true.
Feature Use Case
BEM. Even though CSS modules make BEM be completely meaningless, underscore can be used to split logical parts in CSS class names, especially when CSS is produced by a preprocessor. For example, here is my SCSS:
Feature Proposal
When I set css-loader options like this:
The loader emits an error for each CSS file:
The "modules.namedExport" option requires the "modules.exportLocalsConvention" option to be "camelCaseOnly"
.I understand that class names mustn't contain dashes and many other characters to be able to be constant names, but underscore (
_
) is allowed and I want to use it in constant names.In order to achieve this, there can be a value like
leaveUnderscore
for theexportLocalsConvention
option that shall camelize everything except underscores and be accepted whennamedExports
istrue
.Feature Use Case
BEM. Even though CSS modules make BEM be completely meaningless, underscore can be used to split logical parts in CSS class names, especially when CSS is produced by a preprocessor. For example, here is my SCSS:
I want to use the class names as is:
Having 2 ways to split words (camelCase and under_score) is very handy for giving meaningful names to CSS items.
The text was updated successfully, but these errors were encountered: