Skip to content

Commit

Permalink
chore: replace uglify with terser (#713)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaknas authored Jun 11, 2024
1 parent cc9e181 commit 3ea3fea
Show file tree
Hide file tree
Showing 3 changed files with 310 additions and 51 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@
"stylelint-config-standard": "^19.0.0",
"stylelint-order": "^3.1.1",
"tabbable": "^1.1.3",
"terser-webpack-plugin": "^4.2.3",
"typescript": "^3.8.3",
"uglifyjs-webpack-plugin": "^2.2.0",
"uuid": "^8.3.1",
"wait-on": "^4.0.2",
"webpack": "^4.47.0",
Expand Down Expand Up @@ -153,7 +153,6 @@
}
},
"resolutions": {
"uglify-es": "3.3.4",
"**/react-intl/**/@types/react": "^17.0.2"
}
}
7 changes: 4 additions & 3 deletions scripts/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const CircularDependencyPlugin = require('circular-dependency-plugin');
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const RsyncPlugin = require('@box/frontend/webpack/RsyncPlugin');
const TranslationsPlugin = require('@box/frontend/webpack/TranslationsPlugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');

const { BannerPlugin } = require('webpack');

const license = require('./license');
Expand Down Expand Up @@ -75,8 +76,8 @@ if (isRelease && language === 'en-US') {
// https://webpack.js.org/configuration/optimization/#optimization-minimize
config.optimization = {
minimizer: [
new UglifyJsPlugin({
uglifyOptions: {
new TerserPlugin({
terserOptions: {
warnings: false, // Don't output warnings
compress: {
drop_console: true, // Drop console statements
Expand Down
Loading

0 comments on commit 3ea3fea

Please sign in to comment.