Added gzip compression

This commit is contained in:
Phil Hughes 2017-01-13 11:11:35 -05:00
parent 8a643c8fcd
commit fc4fcf33bf
2 changed files with 6 additions and 1 deletions

View file

@ -3,6 +3,7 @@
var path = require('path');
var webpack = require('webpack');
var StatsPlugin = require('stats-webpack-plugin');
var CompressionPlugin = require("compression-webpack-plugin");
var IS_PRODUCTION = process.env.NODE_ENV === 'production';
var IS_DEV_SERVER = process.argv[1].indexOf('webpack-dev-server') !== -1;
@ -79,7 +80,10 @@ var config = {
chunks: false,
modules: false,
assets: true
})
}),
new CompressionPlugin({
asset: '[path].gz[query]',
}),
],
resolve: {

View file

@ -13,6 +13,7 @@
"babel-core": "^5.8.38",
"babel-loader": "^5.4.2",
"bootstrap-sass": "3.3.6",
"compression-webpack-plugin": "^0.3.2",
"d3": "3.5.11",
"dropzone": "4.2.0",
"exports-loader": "^0.6.3",