Skip to content

Commit

Permalink
[prerender] contentHash: md5 => md4.
Browse files Browse the repository at this point in the history
Webpack uses md4 for all hashes by default (see [1] and [2])

[1] webpack/webpack#6549
[2] webpack/loader-utils#114
  • Loading branch information
apepper committed Mar 26, 2020
1 parent feaa4a2 commit 4835030
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -48,6 +48,7 @@
"html-webpack-plugin": "^3.2.0",
"is-empty": "^1.2.0",
"jquery": "^3.4.1",
"js-md4": "^0.3.2",
"jsontoxml": "^1.0.1",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15",
Expand All @@ -71,7 +72,6 @@
"sass-loader": "^8.0.2",
"scrivito": "^1.11.0",
"slick-carousel": "^1.6.0",
"spark-md5": "^3.0.1",
"terser-webpack-plugin": "^2.3.5",
"typescript": "^3.8.3",
"webpack": "^4.42.1",
Expand Down
6 changes: 3 additions & 3 deletions src/prerenderContent/contentHash.js
@@ -1,6 +1,6 @@
import { hash as md5 } from "spark-md5";
import md4 from "js-md4";

/** Generates a 20 long hex value, based the md5 of the given string */
/** Generates a 20 long hex value, based the md4 of the given string */
export default async function contentHash(input) {
return md5(input).substr(0, 20);
return md4(input).substr(0, 20);
}

0 comments on commit 4835030

Please sign in to comment.