mirror of https://github.com/webpack/webpack.git
				
				
				
			
		
			
				
	
	
		
			42 lines
		
	
	
		
			989 B
		
	
	
	
		
			JavaScript
		
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			989 B
		
	
	
	
		
			JavaScript
		
	
	
	
| "use strict";
 | |
| 
 | |
| /** @type {import("../../../../").Configuration} */
 | |
| module.exports = {
 | |
| 	target: "browserslist: ie 9",
 | |
| 	plugins: [
 | |
| 		(compiler) => {
 | |
| 			compiler.hooks.compilation.tap("Test", (compilation) => {
 | |
| 				expect(compilation.outputOptions.environment).toMatchInlineSnapshot(`
 | |
| 			Object {
 | |
| 			  "arrowFunction": false,
 | |
| 			  "asyncFunction": false,
 | |
| 			  "bigIntLiteral": false,
 | |
| 			  "const": false,
 | |
| 			  "destructuring": false,
 | |
| 			  "document": true,
 | |
| 			  "dynamicImport": false,
 | |
| 			  "dynamicImportInWorker": false,
 | |
| 			  "forOf": false,
 | |
| 			  "globalThis": false,
 | |
| 			  "module": false,
 | |
| 			  "nodePrefixForCoreModules": false,
 | |
| 			  "optionalChaining": false,
 | |
| 			  "templateLiteral": false,
 | |
| 			}
 | |
| 		`);
 | |
| 				expect(compilation.options.externalsPresets).toMatchInlineSnapshot(`
 | |
| 			Object {
 | |
| 			  "electron": false,
 | |
| 			  "electronMain": false,
 | |
| 			  "electronPreload": false,
 | |
| 			  "electronRenderer": false,
 | |
| 			  "node": false,
 | |
| 			  "nwjs": false,
 | |
| 			  "web": true,
 | |
| 			}
 | |
| 		`);
 | |
| 			});
 | |
| 		}
 | |
| 	]
 | |
| };
 |