Skip to content

Commit

Permalink
chore: use terser-webpack-plugin to minimize
Browse files Browse the repository at this point in the history
  • Loading branch information
ozyx committed Nov 18, 2023
1 parent 0f0c0c7 commit 3294886
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .webpack/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, '..');
Expand All @@ -18,5 +19,9 @@ module.exports = merge(common, {
__OPENMCT_ROOT_RELATIVE__: '""'
})
],
devtool: 'source-map'
devtool: 'source-map',
optimization: {
minimize: true,
minimizer: [new TerserPlugin()]
}
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 3294886

Please sign in to comment.