Skip to content

Commit

Permalink
perf: remove zopfli to speed up webpack (mastodon#10288)
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson authored and hiyuki2578 committed Oct 2, 2019
1 parent 8e84e84 commit fa78508
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
4 changes: 0 additions & 4 deletions config/webpack/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -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)$/,
}),
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 1 addition & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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==
Expand Down

0 comments on commit fa78508

Please sign in to comment.