mirror of
				https://github.com/veops/cmdb.git
				synced 2025-10-31 02:56:27 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			714 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			714 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
 | |
| 
 | |
| const plugins = ['@babel/plugin-syntax-import-meta', '@babel/plugin-proposal-optional-chaining', '@babel/plugin-proposal-nullish-coalescing-operator']
 | |
| if (IS_PROD) {
 | |
|   plugins.push('transform-remove-console')
 | |
| }
 | |
| 
 | |
| // lazy load ant-design-vue
 | |
| // if your use import on Demand, Use this code
 | |
| // plugins.push(['import', {
 | |
| //   'libraryName': 'ant-design-vue',
 | |
| //   'libraryDirectory': 'es',
 | |
| //   'style': true // `style: true` 会加载 less 文件
 | |
| // }])
 | |
| 
 | |
| module.exports = {
 | |
|   presets: [
 | |
|     '@vue/cli-plugin-babel/preset',
 | |
|     [
 | |
|       '@babel/preset-env',
 | |
|       {
 | |
|         'useBuiltIns': 'entry',
 | |
|         'corejs': 3
 | |
|       }
 | |
|     ]
 | |
|   ],
 | |
|   plugins
 | |
| }
 |