mirror of https://github.com/webpack/webpack.git
				
				
				
			throw error when using module concatenation and cacheUnaffected
optimization.concatenateModules can't be used with cacheUnaffected as module concatenation is a global effect
This commit is contained in:
		
							parent
							
								
									05ebf5bba6
								
							
						
					
					
						commit
						99a5793ca8
					
				|  | @ -58,6 +58,11 @@ class ModuleConcatenationPlugin { | |||
| 	apply(compiler) { | ||||
| 		const { _backCompat: backCompat } = compiler; | ||||
| 		compiler.hooks.compilation.tap("ModuleConcatenationPlugin", compilation => { | ||||
| 			if (compilation.moduleMemCaches) { | ||||
| 				throw new Error( | ||||
| 					"optimization.concatenateModules can't be used with cacheUnaffected as module concatenation is a global effect" | ||||
| 				); | ||||
| 			} | ||||
| 			const moduleGraph = compilation.moduleGraph; | ||||
| 			const bailoutReasonMap = new Map(); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue