使用new webpack.optimize.UglifyJsPlugin({ compress: {
warnings: false,
drop_debugger: true,
drop_console: true
}
)}提示已经移除该方法,推荐使用minimize,minimize该如何去除console呢?
1 回答
GCT1015
TA贡献1827条经验 获得超4个赞
用cssnano插件npm i -D @intervolga/optimize-cssnano-plugin
const optimizeCssnanoPlugin = require('@intervolga/optimize-cssnano-plugin');module.exports = {
plugins: [ new optimizeCssnanoPlugin({
cssnanoOptions: {
preset: [ 'default',
{
discardComments: {
removeAll: true,
},
}
],
},
})
]
};看错题了,这是压缩css,题主无视吧。。。
- 1 回答
- 0 关注
- 1386 浏览
添加回答
举报
0/150
提交
取消
