阅读:4956回复:0
webpack 压缩js文件配置 Error: webpack.optimize.UglifyJsPlugin has been removed, please use config.optimiza场景
[color='rgba(0, 0, 0, 0.749019607843137)'] const TerserPlugin = require('terser-webpack-plugin'); module.exports = { devtool: "source-map", optimization: { minimizer: [ new TerserPlugin({ cache: true, // 开启缓存 parallel: true, // 支持多进程 sourceMap: true, }), ] } }; ———————————————— 版权声明:本文为CSDN博主「cominglately」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/cominglately/article/details/89525175 |
|