Skip to content

Commit f07a3b8

Browse files
authored
Merge pull request #14860 from webpack/feature-future-hash-digest-length
set hashDigestLength=16 for futureDefaults
2 parents f1e9221 + 3feab5b commit f07a3b8

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

lib/config/defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ const applyOutputDefaults = (
832832
D(output, "chunkLoadTimeout", 120000);
833833
D(output, "hashFunction", futureDefaults ? "xxhash64" : "md4");
834834
D(output, "hashDigest", "hex");
835-
D(output, "hashDigestLength", 20);
835+
D(output, "hashDigestLength", futureDefaults ? 16 : 20);
836836
D(output, "strictModuleExceptionHandling", false);
837837

838838
const optimistic = v => v || v === undefined;

test/Defaults.unittest.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1910,10 +1910,9 @@ describe("Defaults", () => {
19101910
- "topLevelAwait": false,
19111911
+ "topLevelAwait": true,
19121912
@@ ... @@
1913-
+ },
19141913
+ Object {
19151914
+ "rules": Array [
1916-
+ Object {
1915+
@@ ... @@
19171916
+ "descriptionData": Object {
19181917
+ "type": "module",
19191918
+ },
@@ -1924,7 +1923,8 @@ describe("Defaults", () => {
19241923
+ ],
19251924
+ "test": /\\.wasm$/i,
19261925
+ "type": "webassembly/async",
1927-
@@ ... @@
1926+
+ },
1927+
+ Object {
19281928
+ "mimetype": "application/wasm",
19291929
+ "rules": Array [
19301930
+ Object {
@@ -1949,7 +1949,9 @@ describe("Defaults", () => {
19491949
+ "__filename": "warn-mock",
19501950
+ "global": "warn",
19511951
@@ ... @@
1952+
- "hashDigestLength": 20,
19521953
- "hashFunction": "md4",
1954+
+ "hashDigestLength": 16,
19531955
+ "hashFunction": "xxhash64",
19541956
@@ ... @@
19551957
- "<cwd>/node_modules/",

0 commit comments

Comments
 (0)