provide hashFunction parameter to DependencyTemplates

This commit is contained in:
Ivan Kopeykin 2022-01-18 13:42:13 +03:00
parent 10b38b3726
commit 453643af6d
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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;