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.
23 lines
479 B
23 lines
479 B
const plugins = []
|
|
if (process.env.NODE_ENV === 'production') {
|
|
// 如果是生产环境,则自动清理掉打印的日志,但保留error 与 warn
|
|
plugins.push([
|
|
'transform-remove-console',
|
|
{
|
|
// 保留 console.error 与 console.warn
|
|
exclude: ['error']
|
|
}
|
|
])
|
|
}
|
|
plugins.push(['import', {
|
|
libraryName: 'vant',
|
|
libraryDirectory: 'es',
|
|
style: true
|
|
}, 'vant'])
|
|
|
|
module.exports = {
|
|
presets: [
|
|
'@vue/cli-plugin-babel/preset'
|
|
],
|
|
plugins
|
|
}
|