mirror of https://github.com/webpack/webpack.git
				
				
				
			Optimize setting issue on modules
This commit is contained in:
		
							parent
							
								
									741398427a
								
							
						
					
					
						commit
						316319aab8
					
				|  | @ -971,12 +971,10 @@ class Compilation { | |||
| 						moduleGraph.setResolvedModule(originModule, dependency, module); | ||||
| 					} | ||||
| 
 | ||||
| 					if (moduleGraph.getIssuer(module) === undefined) { | ||||
| 						moduleGraph.setIssuer( | ||||
| 							module, | ||||
| 							originModule !== undefined ? originModule : null | ||||
| 						); | ||||
| 					} | ||||
| 					moduleGraph.setIssuerIfUnset( | ||||
| 						module, | ||||
| 						originModule !== undefined ? originModule : null | ||||
| 					); | ||||
| 					if (module !== newModule) { | ||||
| 						if (currentProfile !== undefined) { | ||||
| 							const otherProfile = moduleGraph.getProfile(module); | ||||
|  |  | |||
|  | @ -911,6 +911,16 @@ class ModuleGraph { | |||
| 		mgm.issuer = issuer; | ||||
| 	} | ||||
| 
 | ||||
| 	/** | ||||
| 	 * @param {Module} module the module | ||||
| 	 * @param {Module | null} issuer the issuer module | ||||
| 	 * @returns {void} | ||||
| 	 */ | ||||
| 	setIssuerIfUnset(module, issuer) { | ||||
| 		const mgm = this._getModuleGraphModule(module); | ||||
| 		if (mgm.issuer === undefined) mgm.issuer = issuer; | ||||
| 	} | ||||
| 
 | ||||
| 	/** | ||||
| 	 * @param {Module} module the module | ||||
| 	 * @returns {(string | OptimizationBailoutFunction)[]} optimization bailouts | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue