我正在使用 terser webpack 插件。我试过这个配置。
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
terserOptions: {
output: {
comments: false,
},
},
}),
],
Run Code Online (Sandbox Code Playgroud)
但是,它仍然输出一个 .LICENSE 文件。如何在没有注释的情况下构建代码。
应该
new TerserPlugin({
extractComments: false,
})
Run Code Online (Sandbox Code Playgroud)
见https://github.com/webpack-contrib/terser-webpack-plugin#extractcomments
| 归档时间: |
|
| 查看次数: |
2434 次 |
| 最近记录: |