mirror of https://github.com/webpack/webpack.git
				
				
				
			Merge pull request #15195 from webpack/fix-hash-function-usage
provide hashFunction parameter to DependencyTemplates
This commit is contained in:
		
						commit
						f16e7468a2
					
				|  | @ -1020,7 +1020,9 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si | ||||||
| 		/** @type {Map<DepConstructor, ModuleFactory>} */ | 		/** @type {Map<DepConstructor, ModuleFactory>} */ | ||||||
| 		this.dependencyFactories = new Map(); | 		this.dependencyFactories = new Map(); | ||||||
| 		/** @type {DependencyTemplates} */ | 		/** @type {DependencyTemplates} */ | ||||||
| 		this.dependencyTemplates = new DependencyTemplates(); | 		this.dependencyTemplates = new DependencyTemplates( | ||||||
|  | 			this.outputOptions.hashFunction | ||||||
|  | 		); | ||||||
| 		this.childrenCounters = {}; | 		this.childrenCounters = {}; | ||||||
| 		/** @type {Set<number|string>} */ | 		/** @type {Set<number|string>} */ | ||||||
| 		this.usedChunkIds = null; | 		this.usedChunkIds = null; | ||||||
|  |  | ||||||
|  | @ -57,7 +57,7 @@ class DependencyTemplates { | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	clone() { | 	clone() { | ||||||
| 		const newInstance = new DependencyTemplates(); | 		const newInstance = new DependencyTemplates(this._hashFunction); | ||||||
| 		newInstance._map = new Map(this._map); | 		newInstance._map = new Map(this._map); | ||||||
| 		newInstance._hash = this._hash; | 		newInstance._hash = this._hash; | ||||||
| 		return newInstance; | 		return newInstance; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue