feat(babel): 移除开发环境中的 console 输出- 在 babel 配置中添加 'transform-remove-console' 插件-保留了 console.warn 和 console.error 输出,以便于调试- 此修改有助于减少生产环境中的不必要的 console 输出

This commit is contained in:
陈昱达
2025-08-13 14:13:39 +08:00
parent 484f94ba52
commit 8ec1ea2d6a

View File

@@ -1,11 +1,11 @@
module.exports = {
presets: ['@vue/app'],
plugins: [
// [
// 'transform-remove-console',
// {
// exclude: ['warn', 'error'] // 可选:保留 warn 和 error
// }
// ]
[
'transform-remove-console',
{
exclude: ['warn', 'error'] // 可选:保留 warn 和 error
}
]
]
}