Skip to content

Commit

Permalink
Merge pull request #476 from adarshaj/fix/update-compression-options
Browse files Browse the repository at this point in the history
Don't pass default options and remove redundant helpers. Fixes #473
  • Loading branch information
PatrickJS committed Mar 28, 2016
2 parents 19f7b29 + 2455adc commit 34772dc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
6 changes: 0 additions & 6 deletions config/helpers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var path = require('path');
var zlib = require('zlib');


// Helper functions
Expand All @@ -11,10 +10,6 @@ function hasProcessFlag(flag) {
return process.argv.join('').indexOf(flag) > -1;
}

function gzipMaxLevel(buffer, callback) {
return zlib['gzip'](buffer, {level: 9}, callback);
}

function root(args) {
args = Array.prototype.slice.call(arguments, 0);
return path.join.apply(path, [_root].concat(args));
Expand Down Expand Up @@ -66,7 +61,6 @@ function reverse(arr) {

exports.reverse = reverse;
exports.hasProcessFlag = hasProcessFlag;
exports.gzipMaxLevel = gzipMaxLevel;
exports.root = root;
exports.rootNode = rootNode;
exports.prependExt = prependExt;
Expand Down
1 change: 0 additions & 1 deletion config/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ module.exports = webpackMerge(commonConfig, {
//
// See: https://github.com/webpack/compression-webpack-plugin
new CompressionPlugin({
algorithm: helpers.gzipMaxLevel,
regExp: /\.css$|\.html$|\.js$|\.map$/,
threshold: 2 * 1024
})
Expand Down

0 comments on commit 34772dc

Please sign in to comment.