vue-shop/babel.config.js
2022-02-20 18:57:29 +08:00

28 lines
588 B
JavaScript

/*
* @Description:
* @Version: 1.0
* @Autor: zhuyijun
* @Date: 2021-11-21 14:34:40
* @LastEditTime: 2022-02-17 14:29:22
*/
//项目发布阶段需要用到的babel 插件
const prodPlugins = []
if (process.env.NODE_ENV === 'production') {
prodPlugins.push('transform-remove-console')
}
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
],
plugins: [
[
'component',
{
libraryName: 'element-ui',
styleLibraryName: 'theme-chalk'
}
],
...prodPlugins
]
}