Skip to content

Commit

Permalink
Fix for #1
Browse files Browse the repository at this point in the history
  • Loading branch information
dsebastien committed Feb 12, 2016
1 parent ed7f1b0 commit da8efa2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/webpack_md5_hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function WebpackMd5Hash () {
WebpackMd5Hash.prototype.apply = function(compiler) {
compiler.plugin("compilation", function(compilation) {
compilation.plugin("chunk-hash", function(chunk, chunkHash) {
var source = chunk.modules.sort(compareModules).map(getModuleSource).reduce(concatenateSource);
var source = chunk.modules.sort(compareModules).map(getModuleSource).reduce(concatenateSource, ''); // we provide an initialValue in case there is an empty module source. Ref: http://es5.github.io/#x15.4.4.21
var chunk_hash = md5(source);
chunkHash.digest = function () {
return chunk_hash;
Expand All @@ -37,4 +37,4 @@ WebpackMd5Hash.prototype.apply = function(compiler) {
});
};

module.exports = WebpackMd5Hash;
module.exports = WebpackMd5Hash;

0 comments on commit da8efa2

Please sign in to comment.