55"use strict" ;
66
77const async = require ( "async" ) ;
8-
8+ const crypto = require ( "crypto" ) ;
99const Tapable = require ( "tapable" ) ;
1010const EntryModuleNotFoundError = require ( "./EntryModuleNotFoundError" ) ;
1111const ModuleNotFoundError = require ( "./ModuleNotFoundError" ) ;
@@ -949,7 +949,7 @@ class Compilation extends Tapable {
949949 const hashFunction = outputOptions . hashFunction ;
950950 const hashDigest = outputOptions . hashDigest ;
951951 const hashDigestLength = outputOptions . hashDigestLength ;
952- const hash = require ( " crypto" ) . createHash ( hashFunction ) ;
952+ const hash = crypto . createHash ( hashFunction ) ;
953953 if ( outputOptions . hashSalt )
954954 hash . update ( outputOptions . hashSalt ) ;
955955 this . mainTemplate . updateHash ( hash ) ;
@@ -969,7 +969,7 @@ class Compilation extends Tapable {
969969 } ) ;
970970 for ( let i = 0 ; i < chunks . length ; i ++ ) {
971971 chunk = chunks [ i ] ;
972- const chunkHash = require ( " crypto" ) . createHash ( hashFunction ) ;
972+ const chunkHash = crypto . createHash ( hashFunction ) ;
973973 if ( outputOptions . hashSalt )
974974 hash . update ( outputOptions . hashSalt ) ;
975975 chunk . updateHash ( chunkHash ) ;
@@ -992,7 +992,7 @@ class Compilation extends Tapable {
992992 const hashFunction = outputOptions . hashFunction ;
993993 const hashDigest = outputOptions . hashDigest ;
994994 const hashDigestLength = outputOptions . hashDigestLength ;
995- const hash = require ( " crypto" ) . createHash ( hashFunction ) ;
995+ const hash = crypto . createHash ( hashFunction ) ;
996996 hash . update ( this . fullHash ) ;
997997 hash . update ( update ) ;
998998 this . fullHash = hash . digest ( hashDigest ) ;
0 commit comments