mirror of
https://github.com/desktop/desktop
synced 2024-09-13 05:11:21 +00:00
Use terser for minification
This commit is contained in:
parent
79a5102a7d
commit
f02a040641
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue