summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vue.config.js20
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);
},