Skip to content

Commit

Permalink
add gzip in production mode
Browse files Browse the repository at this point in the history
  • Loading branch information
gogoge committed Jan 5, 2018
1 parent bb83ccf commit 5750e2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions configs/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const common = require('./webpack.common.js')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const CompressionPlugin = require('compression-webpack-plugin')
const path = require('path')
const PUBLIC_FOLDER_PATH = path.resolve('build')

Expand Down Expand Up @@ -50,5 +51,6 @@ module.exports = merge(common, {
'process.env.NODE_ENV': JSON.stringify('production'),
}),
new webpack.optimize.UglifyJsPlugin(),
new CompressionPlugin(),
],
})
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-decorators-legacy": "1.3.4",
"clean-webpack-plugin": "0.1.17",
"compression-webpack-plugin": "1.1.3",
"css-loader": "0.28.7",
"eslint": "4.14.0",
"eslint-config-prettier": "2.9.0",
Expand Down

0 comments on commit 5750e2b

Please sign in to comment.