Skip to content

Commit

Permalink
provide hashFunction parameter to DependencyTemplates
Browse files Browse the repository at this point in the history
  • Loading branch information
vankop committed Jan 18, 2022
1 parent 10b38b3 commit 453643a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/Compilation.js
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,9 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
/** @type {Map<DepConstructor, ModuleFactory>} */
this.dependencyFactories = new Map();
/** @type {DependencyTemplates} */
this.dependencyTemplates = new DependencyTemplates();
this.dependencyTemplates = new DependencyTemplates(
this.outputOptions.hashFunction
);
this.childrenCounters = {};
/** @type {Set<number|string>} */
this.usedChunkIds = null;
Expand Down
2 changes: 1 addition & 1 deletion lib/DependencyTemplates.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class DependencyTemplates {
}

clone() {
const newInstance = new DependencyTemplates();
const newInstance = new DependencyTemplates(this._hashFunction);
newInstance._map = new Map(this._map);
newInstance._hash = this._hash;
return newInstance;
Expand Down

0 comments on commit 453643a

Please sign in to comment.