From 3294886af76f9208f356b28986a4cac537b6eed1 Mon Sep 17 00:00:00 2001 From: Jesse Mazzella Date: Fri, 17 Nov 2023 17:21:46 -0800 Subject: [PATCH] chore: use `terser-webpack-plugin` to minimize --- .webpack/webpack.prod.js | 7 ++++++- package.json | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.webpack/webpack.prod.js b/.webpack/webpack.prod.js index 73d7fad260d..590312bbb58 100644 --- a/.webpack/webpack.prod.js +++ b/.webpack/webpack.prod.js @@ -7,6 +7,7 @@ It is the default webpack configuration. const path = require('path'); const webpack = require('webpack'); const { merge } = require('webpack-merge'); +const TerserPlugin = require('terser-webpack-plugin'); const common = require('./webpack.common'); const projectRootDir = path.resolve(__dirname, '..'); @@ -18,5 +19,9 @@ module.exports = merge(common, { __OPENMCT_ROOT_RELATIVE__: '""' }) ], - devtool: 'source-map' + devtool: 'source-map', + optimization: { + minimize: true, + minimizer: [new TerserPlugin()] + } }); diff --git a/package.json b/package.json index 0a1798f64b6..bee7e6bea9d 100644 --- a/package.json +++ b/package.json @@ -73,6 +73,7 @@ "sass-loader": "13.3.2", "sinon": "17.0.0", "style-loader": "3.3.3", + "terser-webpack-plugin": "5.3.9", "tiny-emitter": "2.1.0", "typescript": "5.2.2", "uuid": "9.0.1",