uglifyJSWebpackPlugin
[TerserPlugin](https://texonom.com/terserplugin-ca9b7c579f0c439aa318dab7a8a5ae7e) 


### [TerserPlugin](https://texonom.com/terserplugin-ca9b7c579f0c439aa318dab7a8a5ae7e) 비슷한 기능
uglifyJSWebpackPlugin 개발자들이 해당 플러그인을 더 이상 유지보수를 진행하지 않고 있는 반면, TerserPlugin은 계속 진행
, minify 속도에서도 차이 tenser가 더 좋음
```typeconst UglifyJSPlugin = require('uglifyjs-webpack-plugin');const path = require('path')module.exports = (env, argv) => ({  optimization: {    minimizer: argv.mode === 'production' ? [      new UglifyJSPlugin({        uglifyOptions: {          compress: {            global_defs: {              "@alert": "console.log",            },            drop_console: true          }        }      })    ] : []  }}```


> [webpack 4: access the mode flag from webpack.config.js file · Issue #6460 · webpack/webpack](https://github.com/webpack/webpack/issues/6460)

> [Webpack & Uglify로 console.logs 제거](https://www.it-swarm.dev/ko/reactjs/webpack-amp-uglify%EB%A1%9C-consolelogs-%EC%A0%9C%EA%B1%B0/828827810/)





