Skip to content

Commit

Permalink
use digest
Browse files Browse the repository at this point in the history
  • Loading branch information
erm0l0v committed Aug 24, 2015
1 parent 455d05c commit adf22c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webpack-md5-hash",
"version": "0.0.3",
"version": "0.0.4",
"description": "Plugin to replace a standard webpack chunkhash with md5.",
"main": "index.js",
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion plugin/webpack_md5_hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ 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);
chunk.hash = md5(source);
var chunk_hash = md5(source);
chunkHash.digest = function () {
return chunk_hash;
};
});
});
};
Expand Down

0 comments on commit adf22c4

Please sign in to comment.