Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Commit

Permalink
perf(index): switch to md4 for content hashing (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi authored and michael-ciniawsky committed Feb 26, 2018
1 parent 9f66276 commit 14d2c4c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class UglifyJsPlugin {
'uglifyjs-webpack-plugin': versions.plugin,
'uglifyjs-webpack-plugin-options': this.options,
path: compiler.outputPath ? `${compiler.outputPath}/${file}` : file,
hash: crypto.createHash('md5').update(input).digest('hex'),
hash: crypto.createHash('md4').update(input).digest('hex'),
});
}

Expand Down
16 changes: 8 additions & 8 deletions test/__snapshots__/cache-options.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -23,56 +23,56 @@ exports[`cache \`true\`: asset manifest.6afe1bc6685e9ab36c1c.js 1`] = `"!functio
exports[`cache \`true\`: cached entry test.js 1`] = `
Array [
"test.js",
"46adcef6cf434fbddbc275218b3e093a",
"28e4d31993a4f0bf5420d06d6e6013b8",
]
`;

exports[`cache \`true\`: cached entry test.js 2`] = `
Array [
"test.js",
"46adcef6cf434fbddbc275218b3e093a",
"28e4d31993a4f0bf5420d06d6e6013b8",
]
`;

exports[`cache \`true\`: cached entry test1.js 1`] = `
Array [
"test1.js",
"6b6ccbbe331608e36cded49fd411c373",
"0ee8d6a0ecdd7bc2322d1e726ef41cdd",
]
`;

exports[`cache \`true\`: cached entry test1.js 2`] = `
Array [
"test1.js",
"6b6ccbbe331608e36cded49fd411c373",
"0ee8d6a0ecdd7bc2322d1e726ef41cdd",
]
`;

exports[`cache \`true\`: cached entry test2.js 1`] = `
Array [
"test2.js",
"975b72a762ef408dcf46a574fead7e60",
"ba96de0d701dab1af6ca647f97d42fb7",
]
`;

exports[`cache \`true\`: cached entry test2.js 2`] = `
Array [
"test2.js",
"975b72a762ef408dcf46a574fead7e60",
"ba96de0d701dab1af6ca647f97d42fb7",
]
`;

exports[`cache \`true\`: cached entry test3.js 1`] = `
Array [
"test3.js",
"fa894d635dc764c42fb6b1d4e3f6ed2b",
"ef8b436e106d1bbfe07b50263e91deac",
]
`;

exports[`cache \`true\`: cached entry test3.js 2`] = `
Array [
"test3.js",
"fa894d635dc764c42fb6b1d4e3f6ed2b",
"ef8b436e106d1bbfe07b50263e91deac",
]
`;

Expand Down

0 comments on commit 14d2c4c

Please sign in to comment.