mirror of
				https://github.com/tobspr/shapez.io.git
				synced 2025-06-13 13:04:03 +00:00 
			
		
		
		
	
		
			
	
	
		
			48 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
		
		
			
		
	
	
			48 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| 
								 | 
							
								module.exports = function (api) {
							 | 
						||
| 
								 | 
							
								    api.cache(true);
							 | 
						||
| 
								 | 
							
								    const presets = [
							 | 
						||
| 
								 | 
							
								        [
							 | 
						||
| 
								 | 
							
								            "@babel/preset-env",
							 | 
						||
| 
								 | 
							
								            {
							 | 
						||
| 
								 | 
							
								                targets: "> 5%",
							 | 
						||
| 
								 | 
							
								                useBuiltIns: "usage",
							 | 
						||
| 
								 | 
							
								                corejs: 3,
							 | 
						||
| 
								 | 
							
								                loose: true,
							 | 
						||
| 
								 | 
							
								                spec: false,
							 | 
						||
| 
								 | 
							
								                modules: "auto",
							 | 
						||
| 
								 | 
							
								            },
							 | 
						||
| 
								 | 
							
								        ],
							 | 
						||
| 
								 | 
							
								    ];
							 | 
						||
| 
								 | 
							
								    const plugins = [
							 | 
						||
| 
								 | 
							
								        "closure-elimination",
							 | 
						||
| 
								 | 
							
								        // var is faster than let and const!
							 | 
						||
| 
								 | 
							
								        [
							 | 
						||
| 
								 | 
							
								            "@babel/plugin-transform-block-scoping",
							 | 
						||
| 
								 | 
							
								            {
							 | 
						||
| 
								 | 
							
								                throwIfClosureRequired: false,
							 | 
						||
| 
								 | 
							
								            },
							 | 
						||
| 
								 | 
							
								        ],
							 | 
						||
| 
								 | 
							
								        [
							 | 
						||
| 
								 | 
							
								            "@babel/plugin-transform-classes",
							 | 
						||
| 
								 | 
							
								            {
							 | 
						||
| 
								 | 
							
								                loose: true,
							 | 
						||
| 
								 | 
							
								            },
							 | 
						||
| 
								 | 
							
								        ],
							 | 
						||
| 
								 | 
							
								    ];
							 | 
						||
| 
								 | 
							
								    return {
							 | 
						||
| 
								 | 
							
								        presets,
							 | 
						||
| 
								 | 
							
								        plugins,
							 | 
						||
| 
								 | 
							
								        highlightCode: true,
							 | 
						||
| 
								 | 
							
								        sourceType: "module",
							 | 
						||
| 
								 | 
							
								        sourceMaps: false,
							 | 
						||
| 
								 | 
							
								        parserOpts: {},
							 | 
						||
| 
								 | 
							
								        only: ["../src/js"],
							 | 
						||
| 
								 | 
							
								        generatorOpts: {
							 | 
						||
| 
								 | 
							
								            retainLines: false,
							 | 
						||
| 
								 | 
							
								            compact: true,
							 | 
						||
| 
								 | 
							
								            minified: true,
							 | 
						||
| 
								 | 
							
								            comments: true,
							 | 
						||
| 
								 | 
							
								        },
							 | 
						||
| 
								 | 
							
								    };
							 | 
						||
| 
								 | 
							
								};
							 |