Skip to content

Commit

Permalink
Merge pull request #14860 from webpack/feature-future-hash-digest-length
Browse files Browse the repository at this point in the history
set hashDigestLength=16 for futureDefaults
  • Loading branch information
sokra committed Nov 29, 2021
2 parents f1e9221 + 3feab5b commit f07a3b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/config/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ const applyOutputDefaults = (
D(output, "chunkLoadTimeout", 120000);
D(output, "hashFunction", futureDefaults ? "xxhash64" : "md4");
D(output, "hashDigest", "hex");
D(output, "hashDigestLength", 20);
D(output, "hashDigestLength", futureDefaults ? 16 : 20);
D(output, "strictModuleExceptionHandling", false);

const optimistic = v => v || v === undefined;
Expand Down
8 changes: 5 additions & 3 deletions test/Defaults.unittest.js
Original file line number Diff line number Diff line change
Expand Up @@ -1910,10 +1910,9 @@ describe("Defaults", () => {
- "topLevelAwait": false,
+ "topLevelAwait": true,
@@ ... @@
+ },
+ Object {
+ "rules": Array [
+ Object {
@@ ... @@
+ "descriptionData": Object {
+ "type": "module",
+ },
Expand All @@ -1924,7 +1923,8 @@ describe("Defaults", () => {
+ ],
+ "test": /\\.wasm$/i,
+ "type": "webassembly/async",
@@ ... @@
+ },
+ Object {
+ "mimetype": "application/wasm",
+ "rules": Array [
+ Object {
Expand All @@ -1949,7 +1949,9 @@ describe("Defaults", () => {
+ "__filename": "warn-mock",
+ "global": "warn",
@@ ... @@
- "hashDigestLength": 20,
- "hashFunction": "md4",
+ "hashDigestLength": 16,
+ "hashFunction": "xxhash64",
@@ ... @@
- "<cwd>/node_modules/",
Expand Down

0 comments on commit f07a3b8

Please sign in to comment.