From adf22c4716e9112a9e5ce6c02f96c46ec5f97d7b Mon Sep 17 00:00:00 2001 From: erm0l0v Date: Mon, 24 Aug 2015 19:09:20 +0300 Subject: [PATCH] use digest --- package.json | 2 +- plugin/webpack_md5_hash.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index cd9f425..90474b9 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/plugin/webpack_md5_hash.js b/plugin/webpack_md5_hash.js index 0cdd5e6..9afe5f4 100644 --- a/plugin/webpack_md5_hash.js +++ b/plugin/webpack_md5_hash.js @@ -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; + }; }); }); };