Skip to content

Commit

Permalink
use destructing for more readable code
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Mar 24, 2018
1 parent 296542e commit c328c65
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/JavascriptModulesPlugin.js
Expand Up @@ -129,10 +129,12 @@ class JavascriptModulesPlugin {
);
compilation.hooks.contentHash.tap("JavascriptModulesPlugin", chunk => {
const outputOptions = compilation.outputOptions;
const hashFunction = outputOptions.hashFunction;
const hashSalt = outputOptions.hashSalt;
const hashDigest = outputOptions.hashDigest;
const hashDigestLength = outputOptions.hashDigestLength;
const {
hashSalt,
hashDigest,
hashDigestLength,
hashFunction
} = outputOptions;
const hash = createHash(hashFunction);
if (hashSalt) hash.update(hashSalt);
const template = chunk.hasRuntime()
Expand Down

0 comments on commit c328c65

Please sign in to comment.