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);
 | 
											moduleGraph.setResolvedModule(originModule, dependency, module);
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
					if (moduleGraph.getIssuer(module) === undefined) {
 | 
										moduleGraph.setIssuerIfUnset(
 | 
				
			||||||
						moduleGraph.setIssuer(
 | 
											module,
 | 
				
			||||||
							module,
 | 
											originModule !== undefined ? originModule : null
 | 
				
			||||||
							originModule !== undefined ? originModule : null
 | 
										);
 | 
				
			||||||
						);
 | 
					 | 
				
			||||||
					}
 | 
					 | 
				
			||||||
					if (module !== newModule) {
 | 
										if (module !== newModule) {
 | 
				
			||||||
						if (currentProfile !== undefined) {
 | 
											if (currentProfile !== undefined) {
 | 
				
			||||||
							const otherProfile = moduleGraph.getProfile(module);
 | 
												const otherProfile = moduleGraph.getProfile(module);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -911,6 +911,16 @@ class ModuleGraph {
 | 
				
			||||||
		mgm.issuer = issuer;
 | 
							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
 | 
						 * @param {Module} module the module
 | 
				
			||||||
	 * @returns {(string | OptimizationBailoutFunction)[]} optimization bailouts
 | 
						 * @returns {(string | OptimizationBailoutFunction)[]} optimization bailouts
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue