mirror of https://github.com/webpack/webpack.git
				
				
				
			fix: handle empty modules in dependecies
This commit is contained in:
		
							parent
							
								
									869a9fc7cc
								
							
						
					
					
						commit
						1bc7657eab
					
				|  | @ -39,6 +39,11 @@ function generateImportObject(module) { | |||
| 			const exportName = dep.name; | ||||
| 			const usedName = dep.module && dep.module.isUsed(exportName); | ||||
| 
 | ||||
| 			if (dep.module === null) { | ||||
| 				// Dependency was not found, an error will be thrown later
 | ||||
| 				continue; | ||||
| 			} | ||||
| 
 | ||||
| 			if (usedName !== false) { | ||||
| 				array.push({ | ||||
| 					exportName, | ||||
|  |  | |||
|  | @ -18,6 +18,11 @@ function generateInitParams(module) { | |||
| 				const exportName = dep.name; | ||||
| 				const usedName = dep.module && dep.module.isUsed(exportName); | ||||
| 
 | ||||
| 				if (dep.module === null) { | ||||
| 					// Dependency was not found, an error will be thrown later
 | ||||
| 					continue; | ||||
| 				} | ||||
| 
 | ||||
| 				if (usedName !== false) { | ||||
| 					list.push( | ||||
| 						`__webpack_require__(${JSON.stringify( | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue