css-loader 6.5.1 → 6.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -29,6 +29,18 @@ To begin, you'll need to install `css-loader`:
29
29
  npm install --save-dev css-loader
30
30
  ```
31
31
 
32
+ or
33
+
34
+ ```console
35
+ yarn add -D css-loader
36
+ ```
37
+
38
+ or
39
+
40
+ ```console
41
+ pnpm add -D css-loader
42
+ ```
43
+
32
44
  Then add the plugin to your `webpack` config. For example:
33
45
 
34
46
  **file.js**
@@ -58,19 +70,26 @@ If, for one reason or another, you need to extract CSS as a file (i.e. do not st
58
70
 
59
71
  ## Options
60
72
 
61
- | Name | Type | Default | Description |
62
- | :-----------------------------------: | :------------------------------------------: | :----------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
63
- | **[`url`](#url)** | `{Boolean\|Object}` | `true` | Allows to enables/disables `url()`/`image-set()` functions handling |
64
- | **[`import`](#import)** | `{Boolean\|Object}` | `true` | Allows to enables/disables `@import` at-rules handling |
65
- | **[`modules`](#modules)** | `{Boolean\|String\|Object}` | `{auto: true}` | Allows to enables/disables or setup CSS Modules options |
66
- | **[`sourceMap`](#sourcemap)** | `{Boolean}` | `compiler.devtool` | Enables/Disables generation of source maps |
67
- | **[`importLoaders`](#importloaders)** | `{Number}` | `0` | Allows enables/disables or setups number of loaders applied before CSS loader for `@import`/CSS Modules and ICSS imports |
68
- | **[`esModule`](#esmodule)** | `{Boolean}` | `true` | Use ES modules syntax |
69
- | **[`exportType`](#exporttype)** | `{'array' \| 'string' \| 'css-style-sheet'}` | `array` | Allows exporting styles as array with modules, string or [constructable stylesheet](https://developers.google.com/web/updates/2019/02/constructable-stylesheets) (i.e. [`CSSStyleSheet`](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet)) |
73
+ - **[`url`](#url)**
74
+ - **[`import`](#import)**
75
+ - **[`modules`](#modules)**
76
+ - **[`sourceMap`](#sourcemap)**
77
+ - **[`importLoaders`](#importloaders)**
78
+ - **[`esModule`](#esmodule)**
79
+ - **[`exportType`](#exporttype)**
70
80
 
71
81
  ### `url`
72
82
 
73
- Type: `Boolean|Object`
83
+ Type:
84
+
85
+ ```ts
86
+ type url =
87
+ | boolean
88
+ | {
89
+ url: (url: string, resourcePath: string) => boolean;
90
+ };
91
+ ```
92
+
74
93
  Default: `true`
75
94
 
76
95
  Allow to enable/disables handling the CSS functions `url` and `image-set`.
@@ -80,7 +99,7 @@ Starting with version [4.0.0](https://github.com/webpack-contrib/css-loader/blob
80
99
 
81
100
  Examples resolutions:
82
101
 
83
- ```
102
+ ```js
84
103
  url(image.png) => require('./image.png')
85
104
  url('image.png') => require('./image.png')
86
105
  url(./image.png) => require('./image.png')
@@ -91,13 +110,13 @@ image-set(url('image2x.png') 1x, url('image1x.png') 2x) => require('./image1x.pn
91
110
 
92
111
  To import assets from a `node_modules` path (include `resolve.modules`) and for `alias`, prefix it with a `~`:
93
112
 
94
- ```
113
+ ```js
95
114
  url(~module/image.png) => require('module/image.png')
96
115
  url('~module/image.png') => require('module/image.png')
97
116
  url(~aliasDirectory/image.png) => require('otherDirectory/image.png')
98
117
  ```
99
118
 
100
- #### `Boolean`
119
+ #### `boolean`
101
120
 
102
121
  Enable/disable `url()` resolving.
103
122
 
@@ -119,7 +138,7 @@ module.exports = {
119
138
  };
120
139
  ```
121
140
 
122
- #### `Object`
141
+ #### `object`
123
142
 
124
143
  Allow to filter `url()`. All filtered `url()` will not be resolved (left in the code as they were written).
125
144
 
@@ -154,7 +173,16 @@ module.exports = {
154
173
 
155
174
  ### `import`
156
175
 
157
- Type: `Boolean|Object`
176
+ Type:
177
+
178
+ <!-- use other name to prettify since import is reserved keyword -->
179
+
180
+ ```ts
181
+ type import =
182
+ | boolean
183
+ | { filter: (url: string, media: string, resourcePath: string) => boolean };
184
+ ```
185
+
158
186
  Default: `true`
159
187
 
160
188
  Allows to enables/disables `@import` at-rules handling.
@@ -180,7 +208,7 @@ To import styles from a `node_modules` path (include `resolve.modules`) and for
180
208
  @import url(~aliasDirectory/style.css) => require('otherDirectory/style.css')
181
209
  ```
182
210
 
183
- #### `Boolean`
211
+ #### `boolean`
184
212
 
185
213
  Enable/disable `@import` resolving.
186
214
 
@@ -202,15 +230,16 @@ module.exports = {
202
230
  };
203
231
  ```
204
232
 
205
- #### `Object`
206
-
207
- | Name | Type | Default | Description |
208
- | :---------------------: | :----------: | :---------: | :------------------------ |
209
- | **[`filter`](#filter)** | `{Function}` | `undefined` | Allow to filter `@import` |
233
+ #### `object`
210
234
 
211
235
  ##### `filter`
212
236
 
213
- Type: `Function`
237
+ Type:
238
+
239
+ ```ts
240
+ type filter = (url: string, media: string, resourcePath: string) => boolean;
241
+ ```
242
+
214
243
  Default: `undefined`
215
244
 
216
245
  Allow to filter `@import`. All filtered `@import` will not be resolved (left in the code as they were written).
@@ -246,7 +275,47 @@ module.exports = {
246
275
 
247
276
  ### `modules`
248
277
 
249
- Type: `Boolean|String|Object`
278
+ Type:
279
+
280
+ ```ts
281
+ type modules =
282
+ | boolean
283
+ | "local"
284
+ | "global"
285
+ | "pure"
286
+ | "icss"
287
+ | {
288
+ auto: boolean | regExp | ((resourcePath: string) => boolean);
289
+ mode:
290
+ | "local"
291
+ | "global"
292
+ | "pure"
293
+ | "icss"
294
+ | ((resourcePath) => "local" | "global" | "pure" | "icss");
295
+ localIdentName: string;
296
+ localIdentContext: string;
297
+ localIdentHashSalt: string;
298
+ localIdentHashFunction: string;
299
+ localIdentHashDigest: string;
300
+ localIdentRegExp: string | regExp;
301
+ getLocalIdent: (
302
+ context: LoaderContext,
303
+ localIdentName: string,
304
+ localName: string
305
+ ) => string;
306
+ namedExport: boolean;
307
+ exportGlobals: boolean;
308
+ exportLocalsConvention:
309
+ | "asIs"
310
+ | "camelCase"
311
+ | "camelCaseOnly"
312
+ | "dashes"
313
+ | "dashesOnly"
314
+ | ((name: string) => string);
315
+ exportOnlyLocals: boolean;
316
+ };
317
+ ```
318
+
250
319
  Default: `undefined`
251
320
 
252
321
  Allows to enable/disable CSS Modules or ICSS and setup configuration:
@@ -436,7 +505,7 @@ We recommend use prefix `v-` for values, `s-` for selectors and `m-` for media a
436
505
  }
437
506
  ```
438
507
 
439
- #### `Boolean`
508
+ #### `boolean`
440
509
 
441
510
  Enable **CSS Modules** features.
442
511
 
@@ -458,7 +527,7 @@ module.exports = {
458
527
  };
459
528
  ```
460
529
 
461
- #### `String`
530
+ #### `string`
462
531
 
463
532
  Enable **CSS Modules** features and setup `mode`.
464
533
 
@@ -481,7 +550,7 @@ module.exports = {
481
550
  };
482
551
  ```
483
552
 
484
- #### `Object`
553
+ #### `object`
485
554
 
486
555
  Enable **CSS Modules** features and setup options for them.
487
556
 
@@ -515,7 +584,12 @@ module.exports = {
515
584
 
516
585
  ##### `auto`
517
586
 
518
- Type: `Boolean|RegExp|Function`
587
+ Type:
588
+
589
+ ```ts
590
+ type auto = boolean | regExp | ((resourcePath: string) => boolean);
591
+ ```
592
+
519
593
  Default: `undefined`
520
594
 
521
595
  Allows auto enable CSS modules/ICSS based on filename when `modules` option is object.
@@ -528,7 +602,7 @@ Possible values:
528
602
  - `RegExp` - enable CSS modules for all files matching `/RegExp/i.test(filename)` regexp.
529
603
  - `function` - enable CSS Modules for files based on the filename satisfying your filter function check.
530
604
 
531
- ###### `Boolean`
605
+ ###### `boolean`
532
606
 
533
607
  Possible values:
534
608
 
@@ -579,7 +653,7 @@ module.exports = {
579
653
  };
580
654
  ```
581
655
 
582
- ###### `Function`
656
+ ###### `function`
583
657
 
584
658
  Enable css modules for files based on the filename satisfying your filter function check.
585
659
 
@@ -605,7 +679,17 @@ module.exports = {
605
679
 
606
680
  ##### `mode`
607
681
 
608
- Type: `String|Function`
682
+ Type:
683
+
684
+ ```ts
685
+ type mode =
686
+ | "local"
687
+ | "global"
688
+ | "pure"
689
+ | "icss"
690
+ | ((resourcePath) => "local" | "global" | "pure" | "icss"))`
691
+ ```
692
+
609
693
  Default: `'local'`
610
694
 
611
695
  Setup `mode` option. You can omit the value when you want `local` mode.
@@ -617,7 +701,7 @@ The `icss` will only compile the low level `Interoperable CSS` format for declar
617
701
 
618
702
  ICSS underpins CSS Module support, and provides a low level syntax for other tools to implement CSS-module variations of their own.
619
703
 
620
- ###### `String`
704
+ ###### `string`
621
705
 
622
706
  Possible values - `local`, `global`, `pure`, and `icss`.
623
707
 
@@ -641,7 +725,7 @@ module.exports = {
641
725
  };
642
726
  ```
643
727
 
644
- ###### `Function`
728
+ ###### `function`
645
729
 
646
730
  Allows set different values for the `mode` option based on a filename
647
731
 
@@ -680,7 +764,12 @@ module.exports = {
680
764
 
681
765
  ##### `localIdentName`
682
766
 
683
- Type: `String`
767
+ Type:
768
+
769
+ ```ts
770
+ type localIdentName = string;
771
+ ```
772
+
684
773
  Default: `'[hash:base64]'`
685
774
 
686
775
  Allows to configure the generated local ident name.
@@ -735,7 +824,12 @@ module.exports = {
735
824
 
736
825
  ##### `localIdentContext`
737
826
 
738
- Type: `String`
827
+ Type:
828
+
829
+ ```ts
830
+ type localIdentContex = string;
831
+ ```
832
+
739
833
  Default: `compiler.context`
740
834
 
741
835
  Allows to redefine basic loader context for local ident name.
@@ -762,7 +856,12 @@ module.exports = {
762
856
 
763
857
  ##### `localIdentHashSalt`
764
858
 
765
- Type: `String`
859
+ Type:
860
+
861
+ ```ts
862
+ type localIdentHashSalt = string;
863
+ ```
864
+
766
865
  Default: `undefined`
767
866
 
768
867
  Allows to add custom hash to generate more unique classes.
@@ -790,7 +889,12 @@ module.exports = {
790
889
 
791
890
  ##### `localIdentHashFunction`
792
891
 
793
- Type: `String`
892
+ Type:
893
+
894
+ ```ts
895
+ type localIdentHashFunction = string;
896
+ ```
897
+
794
898
  Default: `md4`
795
899
 
796
900
  Allows to specify hash function to generate classes .
@@ -818,7 +922,12 @@ module.exports = {
818
922
 
819
923
  ##### `localIdentHashDigest`
820
924
 
821
- Type: `String`
925
+ Type:
926
+
927
+ ```ts
928
+ type localIdentHashDigest = string;
929
+ ```
930
+
822
931
  Default: `hex`
823
932
 
824
933
  Allows to specify hash digest to generate classes.
@@ -846,7 +955,12 @@ module.exports = {
846
955
 
847
956
  ##### `localIdentHashDigestLength`
848
957
 
849
- Type: `Number`
958
+ Type:
959
+
960
+ ```ts
961
+ type localIdentHashDigestLength = number;
962
+ ```
963
+
850
964
  Default: `20`
851
965
 
852
966
  Allows to specify hash digest length to generate classes.
@@ -872,9 +986,44 @@ module.exports = {
872
986
  };
873
987
  ```
874
988
 
989
+ ##### `hashStrategy`
990
+
991
+ Type: `'resource-path-and-local-name' | 'minimal-subset'`
992
+ Default: `'resource-path-and-local-name'`
993
+
994
+ Should local name be used when computing the hash.
995
+
996
+ - `'resource-path-and-local-name'` Both resource path and local name are used when hashing. Each identifier in a module gets its own hash digest, always.
997
+ - `'minimal-subset'` Auto detect if identifier names can be omitted from hashing. Use this value to optimize the output for better GZIP or Brotli compression.
998
+
999
+ **webpack.config.js**
1000
+
1001
+ ```js
1002
+ module.exports = {
1003
+ module: {
1004
+ rules: [
1005
+ {
1006
+ test: /\.css$/i,
1007
+ loader: "css-loader",
1008
+ options: {
1009
+ modules: {
1010
+ hashStrategy: "minimal-subset",
1011
+ },
1012
+ },
1013
+ },
1014
+ ],
1015
+ },
1016
+ };
1017
+ ```
1018
+
875
1019
  ##### `localIdentRegExp`
876
1020
 
877
- Type: `String|RegExp`
1021
+ Type:
1022
+
1023
+ ```ts
1024
+ type localIdentRegExp = string | RegExp;
1025
+ ```
1026
+
878
1027
  Default: `undefined`
879
1028
 
880
1029
  **webpack.config.js**
@@ -899,7 +1048,16 @@ module.exports = {
899
1048
 
900
1049
  ##### `getLocalIdent`
901
1050
 
902
- Type: `Function`
1051
+ Type:
1052
+
1053
+ ```ts
1054
+ type getLocalIdent = (
1055
+ context: LoaderContext,
1056
+ localIdentName: string,
1057
+ localName: string
1058
+ ) => string;
1059
+ ```
1060
+
903
1061
  Default: `undefined`
904
1062
 
905
1063
  Allows to specify a function to generate the classname.
@@ -931,7 +1089,12 @@ module.exports = {
931
1089
 
932
1090
  ##### `namedExport`
933
1091
 
934
- Type: `Boolean`
1092
+ Type:
1093
+
1094
+ ```ts
1095
+ type namedExport = boolean;
1096
+ ```
1097
+
935
1098
  Default: `false`
936
1099
 
937
1100
  Enables/disables ES modules named export for locals.
@@ -987,7 +1150,12 @@ Example below in the [`examples`](#examples) section.
987
1150
 
988
1151
  ##### `exportGlobals`
989
1152
 
990
- Type: `Boolean`
1153
+ Type:
1154
+
1155
+ ```ts
1156
+ type exportsGLobals = boolean;
1157
+ ```
1158
+
991
1159
  Default: `false`
992
1160
 
993
1161
  Allow `css-loader` to export names from global class or id, so you can use that as local name.
@@ -1014,24 +1182,35 @@ module.exports = {
1014
1182
 
1015
1183
  ##### `exportLocalsConvention`
1016
1184
 
1017
- Type: `String|Function`
1185
+ Type:
1186
+
1187
+ ```ts
1188
+ type exportLocalsConvention =
1189
+ | "asIs"
1190
+ | "camelCase"
1191
+ | "camelCaseOnly"
1192
+ | "dashes"
1193
+ | "dashesOnly"
1194
+ | ((name: string) => string);
1195
+ ```
1196
+
1018
1197
  Default: based on the `modules.namedExport` option value, if `true` - `camelCaseOnly`, otherwise `asIs`
1019
1198
 
1020
1199
  Style of exported class names.
1021
1200
 
1022
- ###### `String`
1201
+ ###### `string`
1023
1202
 
1024
1203
  By default, the exported JSON keys mirror the class names (i.e `asIs` value).
1025
1204
 
1026
1205
  > ⚠ Only `camelCaseOnly` value allowed if you set the `namedExport` value to `true`.
1027
1206
 
1028
- | Name | Type | Description |
1029
- | :-------------------: | :--------: | :----------------------------------------------------------------------------------------------- |
1030
- | **`'asIs'`** | `{String}` | Class names will be exported as is. |
1031
- | **`'camelCase'`** | `{String}` | Class names will be camelized, the original class name will not to be removed from the locals |
1032
- | **`'camelCaseOnly'`** | `{String}` | Class names will be camelized, the original class name will be removed from the locals |
1033
- | **`'dashes'`** | `{String}` | Only dashes in class names will be camelized |
1034
- | **`'dashesOnly'`** | `{String}` | Dashes in class names will be camelized, the original class name will be removed from the locals |
1207
+ | Name | Type | Description |
1208
+ | :-------------------: | :------: | :----------------------------------------------------------------------------------------------- |
1209
+ | **`'asIs'`** | `string` | Class names will be exported as is. |
1210
+ | **`'camelCase'`** | `string` | Class names will be camelized, the original class name will not to be removed from the locals |
1211
+ | **`'camelCaseOnly'`** | `string` | Class names will be camelized, the original class name will be removed from the locals |
1212
+ | **`'dashes'`** | `string` | Only dashes in class names will be camelized |
1213
+ | **`'dashesOnly'`** | `string` | Dashes in class names will be camelized, the original class name will be removed from the locals |
1035
1214
 
1036
1215
  **file.css**
1037
1216
 
@@ -1066,7 +1245,7 @@ module.exports = {
1066
1245
  };
1067
1246
  ```
1068
1247
 
1069
- ###### `Function`
1248
+ ###### `function`
1070
1249
 
1071
1250
  **webpack.config.js**
1072
1251
 
@@ -1120,7 +1299,12 @@ module.exports = {
1120
1299
 
1121
1300
  ##### `exportOnlyLocals`
1122
1301
 
1123
- Type: `Boolean`
1302
+ Type:
1303
+
1304
+ ```ts
1305
+ type exportOnlyLocals = boolean;
1306
+ ```
1307
+
1124
1308
  Default: `false`
1125
1309
 
1126
1310
  Export only locals.
@@ -1151,7 +1335,12 @@ module.exports = {
1151
1335
 
1152
1336
  ### `importLoaders`
1153
1337
 
1154
- Type: `Number`
1338
+ Type:
1339
+
1340
+ ```ts
1341
+ type importLoaders = number;
1342
+ ```
1343
+
1155
1344
  Default: `0`
1156
1345
 
1157
1346
  Allows to enables/disables or setups number of loaders applied before CSS loader for `@import` at-rules, CSS modules and ICSS imports, i.e. `@import`/`composes`/`@value value from './values.css'`/etc.
@@ -1190,7 +1379,12 @@ This may change in the future when the module system (i. e. webpack) supports lo
1190
1379
 
1191
1380
  ### `sourceMap`
1192
1381
 
1193
- Type: `Boolean`
1382
+ Type:
1383
+
1384
+ ```ts
1385
+ type sourceMap = boolean;
1386
+ ```
1387
+
1194
1388
  Default: depends on the `compiler.devtool` value
1195
1389
 
1196
1390
  By default generation of source maps depends on the [`devtool`](https://webpack.js.org/configuration/devtool/) option. All values enable source map generation except `eval` and `false` value.
@@ -1215,7 +1409,12 @@ module.exports = {
1215
1409
 
1216
1410
  ### `esModule`
1217
1411
 
1218
- Type: `Boolean`
1412
+ Type:
1413
+
1414
+ ```ts
1415
+ type esModule = boolean;
1416
+ ```
1417
+
1219
1418
  Default: `true`
1220
1419
 
1221
1420
  By default, `css-loader` generates JS modules that use the ES modules syntax.
@@ -1243,7 +1442,12 @@ module.exports = {
1243
1442
 
1244
1443
  ### `exportType`
1245
1444
 
1246
- Type: `'array' | 'string' | 'css-style-sheet'`
1445
+ Type:
1446
+
1447
+ ```ts
1448
+ type exportType = "array" | "string" | "css-style-sheet";
1449
+ ```
1450
+
1247
1451
  Default: `'array'`
1248
1452
 
1249
1453
  Allows exporting styles as array with modules, string or [constructable stylesheet](https://developers.google.com/web/updates/2019/02/constructable-stylesheets) (i.e. [`CSSStyleSheet`](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet)).
@@ -1446,7 +1650,7 @@ For `production` builds it's recommended to extract the CSS from your bundle bei
1446
1650
  This can be achieved by using the [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin), because it creates separate css files.
1447
1651
  For `development` mode (including `webpack-dev-server`) you can use [style-loader](https://github.com/webpack-contrib/style-loader), because it injects CSS into the DOM using multiple <style></style> and works faster.
1448
1652
 
1449
- > i Do not use together `style-loader` and `mini-css-extract-plugin`.
1653
+ > i Do not use `style-loader` and `mini-css-extract-plugin` together.
1450
1654
 
1451
1655
  **webpack.config.js**
1452
1656
 
package/dist/cjs.js CHANGED
@@ -2,4 +2,5 @@
2
2
 
3
3
  const loader = require("./index");
4
4
 
5
- module.exports = loader.default;
5
+ module.exports = loader.default;
6
+ module.exports.defaultGetLocalIdent = require("./utils").defaultGetLocalIdent;
package/dist/options.json CHANGED
@@ -114,6 +114,11 @@
114
114
  "link": "https://github.com/webpack-contrib/css-loader#localidenthashdigestlength",
115
115
  "type": "number"
116
116
  },
117
+ "hashStrategy": {
118
+ "description": "Allows to specify should localName be used when computing the hash.",
119
+ "link": "https://github.com/webpack-contrib/css-loader#hashstrategy",
120
+ "enum": ["resource-path-and-local-name", "minimal-subset"]
121
+ },
117
122
  "localIdentRegExp": {
118
123
  "description": "Allows to specify custom RegExp for local ident name.",
119
124
  "link": "https://github.com/webpack-contrib/css-loader#localidentregexp",
package/dist/utils.js CHANGED
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.WEBPACK_IGNORE_COMMENT_REGEXP = void 0;
7
7
  exports.camelCase = camelCase;
8
8
  exports.combineRequests = combineRequests;
9
+ exports.defaultGetLocalIdent = defaultGetLocalIdent;
9
10
  exports.getExportCode = getExportCode;
10
11
  exports.getFilter = getFilter;
11
12
  exports.getImportCode = getImportCode;
@@ -320,14 +321,15 @@ function escapeLocalIdent(localident) {
320
321
  function defaultGetLocalIdent(loaderContext, localIdentName, localName, options) {
321
322
  const {
322
323
  context,
323
- hashSalt
324
+ hashSalt,
325
+ hashStrategy
324
326
  } = options;
325
327
  const {
326
328
  resourcePath
327
329
  } = loaderContext;
328
330
  const relativeResourcePath = normalizePath(_path.default.relative(context, resourcePath)); // eslint-disable-next-line no-param-reassign
329
331
 
330
- options.content = `${relativeResourcePath}\x00${localName}`;
332
+ options.content = hashStrategy === "minimal-subset" && /\[local\]/.test(localIdentName) ? relativeResourcePath : `${relativeResourcePath}\x00${localName}`;
331
333
  let {
332
334
  hashFunction,
333
335
  hashDigest,
@@ -697,7 +699,8 @@ function getModulesPlugins(options, loaderContext) {
697
699
  localIdentHashFunction,
698
700
  localIdentHashDigest,
699
701
  localIdentHashDigestLength,
700
- localIdentRegExp
702
+ localIdentRegExp,
703
+ hashStrategy
701
704
  } = options.modules;
702
705
  let plugins = [];
703
706
 
@@ -715,6 +718,7 @@ function getModulesPlugins(options, loaderContext) {
715
718
  hashFunction: localIdentHashFunction,
716
719
  hashDigest: localIdentHashDigest,
717
720
  hashDigestLength: localIdentHashDigestLength,
721
+ hashStrategy,
718
722
  regExp: localIdentRegExp
719
723
  });
720
724
  } // A null/undefined value signals that we should invoke the default
@@ -728,6 +732,7 @@ function getModulesPlugins(options, loaderContext) {
728
732
  hashFunction: localIdentHashFunction,
729
733
  hashDigest: localIdentHashDigest,
730
734
  hashDigestLength: localIdentHashDigestLength,
735
+ hashStrategy,
731
736
  regExp: localIdentRegExp
732
737
  });
733
738
  return escapeLocalIdent(localIdent).replace(/\\\[local\\]/gi, exportName);