Use terser for minification

This commit is contained in:
Rafael Oleza 2020-07-13 18:48:02 +02:00
parent 79a5102a7d
commit f02a040641
No known key found for this signature in database
GPG key ID: 559647D09ED485D1
3 changed files with 0 additions and 8 deletions

View file

@ -4,14 +4,10 @@ import * as webpack from 'webpack'
import merge from 'webpack-merge'
import MiniCssExtractPlugin from 'mini-css-extract-plugin'
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'
const MinifyPlugin = require('babel-minify-webpack-plugin')
const config: webpack.Configuration = {
mode: 'production',
devtool: 'source-map',
optimization: {
minimizer: [new MinifyPlugin()],
},
}
const mainConfig = merge({}, common.main, config)

View file

@ -31,9 +31,6 @@ Webpack also handles these steps:
- SCSS stylesheets under `app/styles/` are transpiled to CSS and emitted
- source maps are generated to help with correlating runtime errors to the
corresponding TypeScript source
- in production mode `babel-minify` is used to minify the emitted JavaScript -
we do this over the in-built `uglify-es` support because `uglify-es` caused
some problems in the past generating invalid minified JS. See [#4859](https://github.com/desktop/desktop/pull/4859) and [#4848](https://github.com/desktop/desktop/pull/4848) for more information.
The output from webpack is stored in the `out` directory, and this folder is
ignored in version control.

View file

@ -65,7 +65,6 @@
"aws-sdk": "^2.23.0",
"babel-core": "^6.26.3",
"babel-jest": "^23.4.2",
"babel-minify-webpack-plugin": "^0.3.1",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"chalk": "^2.2.0",
"clean-webpack-plugin": "^0.1.19",