@@ -57,7 +57,7 @@ class CssModule extends webpack.Module {
5757 nameForCondition ( ) {
5858 const resource = this . _identifier . split ( '!' ) . pop ( ) ;
5959 const idx = resource . indexOf ( '?' ) ;
60- if ( idx >= 0 ) return resource . substr ( 0 , idx ) ;
60+ if ( idx >= 0 ) return resource . substring ( 0 , idx ) ;
6161 return resource ;
6262 }
6363
@@ -160,7 +160,7 @@ class MiniCssExtractPlugin {
160160 const { contentHash } = chunk ;
161161 contentHash [ NS ] = hash
162162 . digest ( hashDigest )
163- . substr ( 0 , hashDigestLength ) ;
163+ . substring ( 0 , hashDigestLength ) ;
164164 } ) ;
165165 const { mainTemplate } = compilation ;
166166 mainTemplate . hooks . localVars . tap (
@@ -201,7 +201,7 @@ class MiniCssExtractPlugin {
201201 const shortChunkHashMap = Object . create ( null ) ;
202202 for ( const chunkId of Object . keys ( chunkMaps . hash ) ) {
203203 if ( typeof chunkMaps . hash [ chunkId ] === 'string' ) {
204- shortChunkHashMap [ chunkId ] = chunkMaps . hash [ chunkId ] . substr ( 0 , length ) ;
204+ shortChunkHashMap [ chunkId ] = chunkMaps . hash [ chunkId ] . substring ( 0 , length ) ;
205205 }
206206 }
207207 return `" + ${ JSON . stringify ( shortChunkHashMap ) } [chunkId] + "` ;
@@ -219,7 +219,7 @@ class MiniCssExtractPlugin {
219219 if ( typeof contentHash [ chunkId ] === 'string' ) {
220220 shortContentHashMap [ chunkId ] = contentHash [
221221 chunkId
222- ] . substr ( 0 , length ) ;
222+ ] . substring ( 0 , length ) ;
223223 }
224224 }
225225 return `" + ${ JSON . stringify (
0 commit comments