Skip to content

Commit c328c65

Browse files
committed
use destructing for more readable code
1 parent 296542e commit c328c65

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/JavascriptModulesPlugin.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,12 @@ class JavascriptModulesPlugin {
129129
);
130130
compilation.hooks.contentHash.tap("JavascriptModulesPlugin", chunk => {
131131
const outputOptions = compilation.outputOptions;
132-
const hashFunction = outputOptions.hashFunction;
133-
const hashSalt = outputOptions.hashSalt;
134-
const hashDigest = outputOptions.hashDigest;
135-
const hashDigestLength = outputOptions.hashDigestLength;
132+
const {
133+
hashSalt,
134+
hashDigest,
135+
hashDigestLength,
136+
hashFunction
137+
} = outputOptions;
136138
const hash = createHash(hashFunction);
137139
if (hashSalt) hash.update(hashSalt);
138140
const template = chunk.hasRuntime()

0 commit comments

Comments
 (0)