mirror of https://github.com/webpack/webpack.git
				
				
				
			
		
			
				
	
	
		
			24 lines
		
	
	
		
			445 B
		
	
	
	
		
			JavaScript
		
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			445 B
		
	
	
	
		
			JavaScript
		
	
	
	
| /** @type {import("../../../../").Configuration} */
 | |
| module.exports = {
 | |
| 	mode: "development",
 | |
| 	output: {
 | |
| 		assetModuleFilename: ({ filename }) => {
 | |
| 			if (/.png$/.test(filename)) {
 | |
| 				return "images/[\\ext\\]/success-png[ext]";
 | |
| 			}
 | |
| 			if (/.svg$/.test(filename)) {
 | |
| 				return "images/success-svg[ext]";
 | |
| 			}
 | |
| 			return "images/failure[ext]";
 | |
| 		}
 | |
| 	},
 | |
| 	module: {
 | |
| 		rules: [
 | |
| 			{
 | |
| 				test: /\.(png|svg)$/,
 | |
| 				type: "asset/resource"
 | |
| 			}
 | |
| 		]
 | |
| 	}
 | |
| };
 |