安装 npm install console-remove-loader 使用 { test:/\.(vue|js|ts)$/, loader:'console-remove-loader', options:{ isHandle:true } },