@@ -57,7 +57,7 @@ class CssModule extends webpack.Module {
57
57
nameForCondition ( ) {
58
58
const resource = this . _identifier . split ( '!' ) . pop ( ) ;
59
59
const idx = resource . indexOf ( '?' ) ;
60
- if ( idx >= 0 ) return resource . substr ( 0 , idx ) ;
60
+ if ( idx >= 0 ) return resource . substring ( 0 , idx ) ;
61
61
return resource ;
62
62
}
63
63
@@ -160,7 +160,7 @@ class MiniCssExtractPlugin {
160
160
const { contentHash } = chunk ;
161
161
contentHash [ NS ] = hash
162
162
. digest ( hashDigest )
163
- . substr ( 0 , hashDigestLength ) ;
163
+ . substring ( 0 , hashDigestLength ) ;
164
164
} ) ;
165
165
const { mainTemplate } = compilation ;
166
166
mainTemplate . hooks . localVars . tap (
@@ -201,7 +201,7 @@ class MiniCssExtractPlugin {
201
201
const shortChunkHashMap = Object . create ( null ) ;
202
202
for ( const chunkId of Object . keys ( chunkMaps . hash ) ) {
203
203
if ( typeof chunkMaps . hash [ chunkId ] === 'string' ) {
204
- shortChunkHashMap [ chunkId ] = chunkMaps . hash [ chunkId ] . substr ( 0 , length ) ;
204
+ shortChunkHashMap [ chunkId ] = chunkMaps . hash [ chunkId ] . substring ( 0 , length ) ;
205
205
}
206
206
}
207
207
return `" + ${ JSON . stringify ( shortChunkHashMap ) } [chunkId] + "` ;
@@ -219,7 +219,7 @@ class MiniCssExtractPlugin {
219
219
if ( typeof contentHash [ chunkId ] === 'string' ) {
220
220
shortContentHashMap [ chunkId ] = contentHash [
221
221
chunkId
222
- ] . substr ( 0 , length ) ;
222
+ ] . substring ( 0 , length ) ;
223
223
}
224
224
}
225
225
return `" + ${ JSON . stringify (
0 commit comments