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" ) ;
@@ -550,8 +550,6 @@ class Compilation extends Tapable {
550550
551551 const shouldRecord = self . applyPluginsBailResult ( "should-record" ) !== false ;
552552
553- self . sortItemsBeforeIds ( ) ;
554-
555553 self . applyPlugins2 ( "revive-modules" , self . modules , self . records ) ;
556554 self . applyPlugins1 ( "optimize-module-order" , self . modules ) ;
557555 self . applyPlugins1 ( "advanced-optimize-module-order" , self . modules ) ;
@@ -896,10 +894,6 @@ class Compilation extends Tapable {
896894 } ) ;
897895 }
898896
899- sortItemsBeforeIds ( ) {
900-
901- }
902-
903897 sortItemsWithModuleIds ( ) {
904898 this . modules . sort ( byId ) ;
905899 this . modules . forEach ( module => module . sortItems ( ) ) ;
@@ -955,7 +949,7 @@ class Compilation extends Tapable {
955949 const hashFunction = outputOptions . hashFunction ;
956950 const hashDigest = outputOptions . hashDigest ;
957951 const hashDigestLength = outputOptions . hashDigestLength ;
958- const hash = require ( " crypto" ) . createHash ( hashFunction ) ;
952+ const hash = crypto . createHash ( hashFunction ) ;
959953 if ( outputOptions . hashSalt )
960954 hash . update ( outputOptions . hashSalt ) ;
961955 this . mainTemplate . updateHash ( hash ) ;
@@ -975,7 +969,7 @@ class Compilation extends Tapable {
975969 } ) ;
976970 for ( let i = 0 ; i < chunks . length ; i ++ ) {
977971 chunk = chunks [ i ] ;
978- const chunkHash = require ( " crypto" ) . createHash ( hashFunction ) ;
972+ const chunkHash = crypto . createHash ( hashFunction ) ;
979973 if ( outputOptions . hashSalt )
980974 hash . update ( outputOptions . hashSalt ) ;
981975 chunk . updateHash ( chunkHash ) ;
@@ -998,7 +992,7 @@ class Compilation extends Tapable {
998992 const hashFunction = outputOptions . hashFunction ;
999993 const hashDigest = outputOptions . hashDigest ;
1000994 const hashDigestLength = outputOptions . hashDigestLength ;
1001- const hash = require ( " crypto" ) . createHash ( hashFunction ) ;
995+ const hash = crypto . createHash ( hashFunction ) ;
1002996 hash . update ( this . fullHash ) ;
1003997 hash . update ( update ) ;
1004998 this . fullHash = hash . digest ( hashDigest ) ;
0 commit comments