Skip to content

Commit 719f7b6

Browse files
author
myxingke
committed
开启GZIP压缩
1 parent 61e37d1 commit 719f7b6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

config/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ module.exports = {
7676
* Source Maps
7777
*/
7878

79-
productionSourceMap: true,
79+
productionSourceMap: false,
8080
// https://webpack.js.org/configuration/devtool/#production
8181
devtool: '#source-map',
8282

8383
// Gzip off by default as many popular static hosts such as
8484
// Surge or Netlify already gzip all static assets for you.
8585
// Before setting to `true`, make sure to:
8686
// npm install --save-dev compression-webpack-plugin
87-
productionGzip: false,
87+
productionGzip: true,
8888
productionGzipExtensions: ['js', 'css'],
8989

9090
// Run the build command with an extra argument to

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"babel-preset-env": "^1.3.2",
3131
"babel-preset-stage-2": "^6.22.0",
3232
"chalk": "^2.0.1",
33+
"compression-webpack-plugin": "^1.1.3",
3334
"copy-webpack-plugin": "^4.0.1",
3435
"css-loader": "^0.28.0",
3536
"eslint": "^3.19.0",

0 commit comments

Comments
 (0)