diff options
author | gumi <git@gumi.ca> | 2019-07-26 11:31:33 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2019-07-26 11:31:33 -0400 |
commit | 93751e507fc844e4828b32be3db04f31adebc93d (patch) | |
tree | 1ae767fb1520b1c74ada50c0f27a0ce15ade133d | |
parent | 22cdc70221ddc7036eb29fea8e0ddcf1dc6108c8 (diff) | |
download | website-93751e507fc844e4828b32be3db04f31adebc93d.tar.gz website-93751e507fc844e4828b32be3db04f31adebc93d.tar.bz2 website-93751e507fc844e4828b32be3db04f31adebc93d.tar.xz website-93751e507fc844e4828b32be3db04f31adebc93d.zip |
use zopfli more aggressively
-rw-r--r-- | vue.config.js | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/vue.config.js b/vue.config.js index ce3973e..be8982d 100644 --- a/vue.config.js +++ b/vue.config.js @@ -8,18 +8,28 @@ module.exports = { configureWebpack: { plugins: [ new CompressionPlugin({ - filename: '[path].br[query]', - algorithm: 'brotliCompress', + filename: "[path].br[query]", + algorithm: "brotliCompress", test: /\.(js|css|html|svg|ico|png|webp|ttf|woff|woff2)$/, compressionOptions: { level: 11 }, - threshold: 10240, - minRatio: 0.8, - deleteOriginalAssets: false, + minRatio: 0.9, }), new CompressionPlugin({ + filename: "[path].gz[query]", compressionOptions: { numiterations: 15, }, + minRatio: 0.9, + algorithm (input, compressionOptions, callback) { + return zopfli.gzip(input, compressionOptions, callback); + }, + }), + new CompressionPlugin({ + filename: "[path].zopfli[query]", + compressionOptions: { + numiterations: 15, + }, + minRatio: 0.9, algorithm (input, compressionOptions, callback) { return zopfli.gzip(input, compressionOptions, callback); }, |