File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -774,9 +774,13 @@ module.exports = class SplitChunksPlugin {
774
774
const chunkIndexMap = new Map ( ) ;
775
775
const ZERO = BigInt ( "0" ) ;
776
776
const ONE = BigInt ( "1" ) ;
777
- let index = ONE ;
777
+ const START = ONE << BigInt ( "31" ) ;
778
+ let index = START ;
778
779
for ( const chunk of chunks ) {
779
- chunkIndexMap . set ( chunk , index ) ;
780
+ chunkIndexMap . set (
781
+ chunk ,
782
+ index | BigInt ( ( Math . random ( ) * 0x7fffffff ) | 0 )
783
+ ) ;
780
784
index = index << ONE ;
781
785
}
782
786
/**
@@ -793,7 +797,8 @@ module.exports = class SplitChunksPlugin {
793
797
let key =
794
798
chunkIndexMap . get ( first ) | chunkIndexMap . get ( result . value ) ;
795
799
while ( ! ( result = iterator . next ( ) ) . done ) {
796
- key = key | chunkIndexMap . get ( result . value ) ;
800
+ const raw = chunkIndexMap . get ( result . value ) ;
801
+ key = key ^ raw ;
797
802
}
798
803
return key ;
799
804
} ;
You can’t perform that action at this time.
0 commit comments