From 8da5b8e6695e3bcca8eb4bca754faef83a6656eb Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Fri, 15 Mar 2019 20:02:30 -0700 Subject: [PATCH] perf: remove zopfli to speed up webpack (#10288) --- config/webpack/production.js | 4 ---- package.json | 1 - yarn.lock | 9 +-------- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/config/webpack/production.js b/config/webpack/production.js index cae978fcb3..6f27aa2c70 100644 --- a/config/webpack/production.js +++ b/config/webpack/production.js @@ -7,7 +7,6 @@ const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); const OfflinePlugin = require('offline-plugin'); const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); const CompressionPlugin = require('compression-webpack-plugin'); -const zopfli = require('@gfx/zopfli'); const { output } = require('./configuration'); const sharedConfig = require('./shared'); @@ -55,9 +54,6 @@ module.exports = merge(sharedConfig, { plugins: [ new CompressionPlugin({ filename: '[path].gz[query]', - algorithm(input, compressionOptions, callback) { - return zopfli.gzip(input, compressionOptions, callback); - }, cache: true, test: /\.(js|css|html|json|ico|svg|eot|otf|ttf|map)$/, }), diff --git a/package.json b/package.json index 79240df072..63cfa25b80 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,6 @@ "@babel/preset-env": "^7.3.4", "@babel/preset-react": "^7.0.0", "@babel/runtime": "^7.3.4", - "@gfx/zopfli": "^1.0.11", "array-includes": "^3.0.3", "autoprefixer": "^9.4.10", "axios": "^0.18.0", diff --git a/yarn.lock b/yarn.lock index 47bbafc879..9d7f0eccb5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -846,13 +846,6 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.2.tgz#63985d3d8b02530e0869962f4da09142ee8e200e" integrity sha512-n/VQ4mbfr81aqkx/XmVicOLjviMuy02eenSdJY33SVA7S2J42EU0P1H0mOogfYedb3wXA0d/LVtBrgTSm04WEA== -"@gfx/zopfli@^1.0.11": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@gfx/zopfli/-/zopfli-1.0.11.tgz#6ced06b4566a5feb0036fe6a1e0262ce6cb1d6c5" - integrity sha512-wW+hi+bqdYCpBIvL8g7RYub9YXf5crhZK9SNk/VZmbF177Em1VwFv488qyh8iBpCo6GptcP1Zam0bJfY3VmMbg== - dependencies: - base64-js "^1.3.0" - "@jest/console@^24.3.0": version "24.3.0" resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.3.0.tgz#7bd920d250988ba0bf1352c4493a48e1cb97671e" @@ -1690,7 +1683,7 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= -base64-js@^1.0.2, base64-js@^1.3.0: +base64-js@^1.0.2: version "1.3.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" integrity sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==