inleft
2022-02-21 504927efd3bd35f12714cd6367e6f2a9c5d2d1dc
commit | author | age
9bcb19 1 const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
I 2
3 const plugins = []
4 if (IS_PROD) {
5   plugins.push('transform-remove-console')
6 }
7
8 // lazy load ant-design-vue
9 // if your use import on Demand, Use this code
10 plugins.push(['import', {
11   'libraryName': 'ant-design-vue',
12   'libraryDirectory': 'es',
13   'style': true // `style: true` 会加载 less 文件
14 }])
15
16 module.exports = {
17   presets: [
18     '@vue/cli-plugin-babel/preset',
19     [
20       '@babel/preset-env',
21       {
22         'useBuiltIns': 'entry',
23         'corejs': 3
24       }
25     ]
26   ],
27   plugins
28 }