File tree Expand file tree Collapse file tree 1 file changed +1
-51
lines changed Expand file tree Collapse file tree 1 file changed +1
-51
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,6 @@ module.exports = {
118
118
| ** [ ` importLoaders ` ] ( #importloaders ) ** | ` {Number} ` | ` 0 ` | Enables/Disables or setups number of loaders applied before CSS loader |
119
119
| ** [ ` onlyLocals ` ] ( #onlylocals ) ** | ` {Boolean} ` | ` false ` | Export only locals |
120
120
| ** [ ` esModule ` ] ( #esmodule ) ** | ` {Boolean} ` | ` false ` | Use ES modules syntax |
121
- | ** [ ` namedExport ` ] ( #namedExport ) ** | ` {Boolean} ` | ` false ` | Use ES modules named export |
122
121
123
122
### ` url `
124
123
@@ -532,6 +531,7 @@ module.exports = {
532
531
mode: ' local' ,
533
532
exportGlobals: true ,
534
533
localIdentName: ' [path][name]__[local]--[hash:base64:5]' ,
534
+ localsConvention: ' camelCase' ,
535
535
context: path .resolve (__dirname , ' src' ),
536
536
hashPrefix: ' my-custom-hash' ,
537
537
namedExport: true ,
@@ -1089,56 +1089,6 @@ module.exports = {
1089
1089
};
1090
1090
```
1091
1091
1092
- ### ` namedExport `
1093
-
1094
- Type: ` Boolean `
1095
- Default: ` false `
1096
-
1097
- Enable/disable ES modules named export for css classes.
1098
- Names of exported classes are converted to camelCase.
1099
-
1100
- ** styles.css**
1101
-
1102
- ``` css
1103
- .foo-baz {
1104
- color : red ;
1105
- }
1106
- .bar {
1107
- color : blue ;
1108
- }
1109
- ```
1110
-
1111
- ** index.js**
1112
-
1113
- ``` js
1114
- import { fooBaz , bar } from ' ./styles.css' ;
1115
-
1116
- console .log (fooBaz, bar);
1117
- ```
1118
-
1119
- You can enable a ES module named export using:
1120
-
1121
- ** webpack.config.js**
1122
-
1123
- ``` js
1124
- module .exports = {
1125
- module: {
1126
- rules: [
1127
- {
1128
- test: / \. css$ / i ,
1129
- loader: ' css-loader' ,
1130
- options: {
1131
- esModule: true ,
1132
- modules: {
1133
- namedExport: true ,
1134
- },
1135
- },
1136
- },
1137
- ],
1138
- },
1139
- };
1140
- ```
1141
-
1142
1092
## Examples
1143
1093
1144
1094
### Assets
You can’t perform that action at this time.
0 commit comments