You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
760 B
41 lines
760 B
/*
|
|
* @Description:
|
|
* @Author: 刘宣
|
|
* @email: 1395380336@qq.com
|
|
* @Date: 2021-02-04 11:32:45
|
|
* @LastEditTime: 2021-03-05 11:44:02
|
|
*/
|
|
const prodPlugin = []
|
|
// 生产环境移除所有的console
|
|
if (process.env.NODE_ENV === 'production') {
|
|
prodPlugin.push([
|
|
'transform-remove-console',
|
|
{
|
|
// 保留 console.error 与 console.warn
|
|
exclude: ['error', 'warn']
|
|
}
|
|
])
|
|
}
|
|
module.exports = {
|
|
presets: [
|
|
'@vue/cli-plugin-babel/preset',
|
|
[
|
|
'@babel/preset-env',
|
|
{
|
|
'useBuiltIns': 'usage', // entry,usage
|
|
'corejs': 3
|
|
}
|
|
]
|
|
|
|
],
|
|
"plugins": [
|
|
[
|
|
"component",
|
|
{
|
|
"libraryName": "element-ui",
|
|
"styleLibraryName": "theme-chalk"
|
|
}
|
|
],
|
|
...prodPlugin
|
|
]
|
|
}
|