| 
									
										
										
										
											2020-04-20 13:36:55 +08:00
										 |  |  | /** @type {import("../../../../").Configuration} */ | 
					
						
							| 
									
										
										
										
											2019-07-19 06:08:50 +08:00
										 |  |  | module.exports = { | 
					
						
							|  |  |  | 	mode: "development", | 
					
						
							|  |  |  | 	output: { | 
					
						
							|  |  |  | 		assetModuleFilename: ({ filename }) => { | 
					
						
							|  |  |  | 			if (/.png$/.test(filename)) { | 
					
						
							| 
									
										
										
										
											2020-07-29 17:14:26 +08:00
										 |  |  | 				return "images/[\\ext\\]/success-png[ext]"; | 
					
						
							| 
									
										
										
										
											2019-07-19 06:08:50 +08:00
										 |  |  | 			} | 
					
						
							|  |  |  | 			if (/.svg$/.test(filename)) { | 
					
						
							|  |  |  | 				return "images/success-svg[ext]"; | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 			return "images/failure[ext]"; | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	}, | 
					
						
							|  |  |  | 	module: { | 
					
						
							|  |  |  | 		rules: [ | 
					
						
							|  |  |  | 			{ | 
					
						
							|  |  |  | 				test: /\.(png|svg)$/, | 
					
						
							| 
									
										
										
										
											2019-11-26 20:56:27 +08:00
										 |  |  | 				type: "asset/resource" | 
					
						
							| 
									
										
										
										
											2019-07-19 06:08:50 +08:00
										 |  |  | 			} | 
					
						
							|  |  |  | 		] | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | }; |