| 
									
										
										
										
											2025-07-16 22:29:28 +08:00
										 |  |  | "use strict"; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-24 20:41:54 +08:00
										 |  |  | /** @type {import("../../../../").Configuration} */ | 
					
						
							|  |  |  | module.exports = { | 
					
						
							| 
									
										
										
										
											2020-09-28 16:53:20 +08:00
										 |  |  | 	target: "browserslist: ie 9", | 
					
						
							|  |  |  | 	plugins: [ | 
					
						
							|  |  |  | 		compiler => { | 
					
						
							|  |  |  | 			compiler.hooks.compilation.tap("Test", compilation => { | 
					
						
							|  |  |  | 				expect(compilation.outputOptions.environment).toMatchInlineSnapshot(`
 | 
					
						
							|  |  |  | 			Object { | 
					
						
							|  |  |  | 			  "arrowFunction": false, | 
					
						
							| 
									
										
										
										
											2024-01-14 22:37:32 +08:00
										 |  |  | 			  "asyncFunction": false, | 
					
						
							| 
									
										
										
										
											2020-09-28 16:53:20 +08:00
										 |  |  | 			  "bigIntLiteral": false, | 
					
						
							|  |  |  | 			  "const": false, | 
					
						
							|  |  |  | 			  "destructuring": false, | 
					
						
							| 
									
										
										
										
											2024-03-25 21:07:02 +08:00
										 |  |  | 			  "document": true, | 
					
						
							| 
									
										
										
										
											2020-09-28 16:53:20 +08:00
										 |  |  | 			  "dynamicImport": false, | 
					
						
							| 
									
										
										
										
											2023-05-30 03:05:03 +08:00
										 |  |  | 			  "dynamicImportInWorker": false, | 
					
						
							| 
									
										
										
										
											2020-09-28 16:53:20 +08:00
										 |  |  | 			  "forOf": false, | 
					
						
							| 
									
										
										
										
											2023-05-30 02:27:48 +08:00
										 |  |  | 			  "globalThis": false, | 
					
						
							| 
									
										
										
										
											2020-09-28 16:53:20 +08:00
										 |  |  | 			  "module": false, | 
					
						
							| 
									
										
										
										
											2024-04-12 00:24:59 +08:00
										 |  |  | 			  "nodePrefixForCoreModules": false, | 
					
						
							| 
									
										
										
										
											2023-05-30 02:27:48 +08:00
										 |  |  | 			  "optionalChaining": false, | 
					
						
							|  |  |  | 			  "templateLiteral": false, | 
					
						
							| 
									
										
										
										
											2020-09-28 16:53:20 +08:00
										 |  |  | 			} | 
					
						
							|  |  |  | 		`);
 | 
					
						
							|  |  |  | 				expect(compilation.options.externalsPresets).toMatchInlineSnapshot(`
 | 
					
						
							|  |  |  | 			Object { | 
					
						
							|  |  |  | 			  "electron": false, | 
					
						
							|  |  |  | 			  "electronMain": false, | 
					
						
							|  |  |  | 			  "electronPreload": false, | 
					
						
							|  |  |  | 			  "electronRenderer": false, | 
					
						
							|  |  |  | 			  "node": false, | 
					
						
							|  |  |  | 			  "nwjs": false, | 
					
						
							|  |  |  | 			  "web": true, | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		`);
 | 
					
						
							|  |  |  | 			}); | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	] | 
					
						
							| 
									
										
										
										
											2020-09-24 20:41:54 +08:00
										 |  |  | }; |