mirror of https://github.com/webpack/webpack.git
parent
1014229d9a
commit
ce76858334
|
|
@ -769,6 +769,8 @@ Compilation.prototype.createHash = function createHash() {
|
|||
var hashDigest = outputOptions.hashDigest;
|
||||
var hashDigestLength = outputOptions.hashDigestLength;
|
||||
var hash = require("crypto").createHash(hashFunction);
|
||||
if(outputOptions.hashSalt)
|
||||
hash.update(outputOptions.hashSalt);
|
||||
this.mainTemplate.updateHash(hash);
|
||||
this.chunkTemplate.updateHash(hash);
|
||||
this.moduleTemplate.updateHash(hash);
|
||||
|
|
@ -782,6 +784,8 @@ Compilation.prototype.createHash = function createHash() {
|
|||
for(i = 0; i < chunks.length; i++) {
|
||||
chunk = chunks[i];
|
||||
var chunkHash = require("crypto").createHash(hashFunction);
|
||||
if(outputOptions.hashSalt)
|
||||
hash.update(outputOptions.hashSalt);
|
||||
chunk.updateHash(chunkHash);
|
||||
if(chunk.entry) {
|
||||
this.mainTemplate.updateHashForChunk(chunkHash, chunk);
|
||||
|
|
|
|||
Loading…
Reference in New Issue