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
feat: replace camelCase option on exportLocalsStyle option (#938)
BREAKING CHANGE: `camelCase` option was removed in favor `exportLocalsStyle` option. Option value should be `String`. Use `camelCase` if you option value was `true` and `asIs` if you option value was `false`.
|**`false`**|`{Boolean}`| Class names won't be camelized |
707
-
|**`true`**|`{Boolean}`| Class names will be camelized, the original class name will not to be removed from the locals |
708
-
|**`'dashes'`**|`{String}`| Only dashes in class names will be camelized |
709
-
|**`'only'`**|`{String}`| Introduced in `0.27.1`. Class names will be camelized, the original class name will be removed from the locals |
710
-
|**`'dashesOnly'`**|`{String}`| Introduced in `0.27.1`. Dashes in class names will be camelized, the original class name will be removed from the locals |
711
-
712
-
**file.css**
713
-
714
-
```css
715
-
.class-name {
716
-
}
717
-
```
718
-
719
-
**file.js**
720
-
721
-
```js
722
-
import { className } from'file.css';
723
-
```
724
-
725
-
**webpack.config.js**
726
-
727
-
```js
728
-
module.exports= {
729
-
module: {
730
-
rules: [
731
-
{
732
-
test:/\.css$/i,
733
-
loader:'css-loader',
734
-
options: {
735
-
camelCase:true,
736
-
},
737
-
},
738
-
],
739
-
},
740
-
};
741
-
```
742
-
743
697
### `importLoaders`
744
698
745
699
Type: `Number`
@@ -774,6 +728,52 @@ module.exports = {
774
728
775
729
This may change in the future when the module system (i. e. webpack) supports loader matching by origin.
776
730
731
+
### `exportLocalsStyle`
732
+
733
+
Type: `String`
734
+
Default: `undefined`
735
+
736
+
By default, the exported JSON keys mirror the class names (i.e `asIs` value).
0 commit comments