From 8172c90046767037b2e1dcc9cb023d8a71b4ced5 Mon Sep 17 00:00:00 2001 From: gumi Date: Mon, 5 Oct 2020 23:26:28 -0400 Subject: update the dependencies while we're at it --- vue.config.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'vue.config.js') diff --git a/vue.config.js b/vue.config.js index c481b94..4041037 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,21 +1,22 @@ // see https://cli.vuejs.org/config const CompressionPlugin = require("compression-webpack-plugin"); const zopfli = require("@gfx/zopfli"); +const zlib = require("zlib"); module.exports = { //integrity: true, // enable SRI in script/style tags parallel: true, configureWebpack: { - plugins: process.env.NODE_ENV === "production" ? [ + plugins: process.env.NODE_ENV === "production" && Reflect.has(zlib, "brotliCompress") ? [ new CompressionPlugin({ - filename: "[path].br[query]", + filename: "[file].br[query]", algorithm: "brotliCompress", test: /\.(js|css|html|svg|ico|png|webp|ttf|woff|woff2)$/, compressionOptions: { level: 11 }, minRatio: 0.9, }), new CompressionPlugin({ - filename: "[path].gz[query]", + filename: "[file].gz[query]", compressionOptions: { numiterations: 15, }, @@ -25,7 +26,7 @@ module.exports = { }, }), new CompressionPlugin({ - filename: "[path].zopfli[query]", + filename: "[file].zopfli[query]", compressionOptions: { numiterations: 15, }, -- cgit v1.2.3-60-g2f50