summaryrefslogtreecommitdiff
path: root/vue.config.js
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2019-07-26 11:18:20 -0400
committergumi <git@gumi.ca>2019-07-26 11:19:08 -0400
commit22cdc70221ddc7036eb29fea8e0ddcf1dc6108c8 (patch)
treeab8b297395a0ea493d17ee1d4baacd346e4a3d60 /vue.config.js
parente24b06c72aebdb4cd3d75e83d83fcd7a39820ebb (diff)
downloadwebsite-22cdc70221ddc7036eb29fea8e0ddcf1dc6108c8.tar.gz
website-22cdc70221ddc7036eb29fea8e0ddcf1dc6108c8.tar.bz2
website-22cdc70221ddc7036eb29fea8e0ddcf1dc6108c8.tar.xz
website-22cdc70221ddc7036eb29fea8e0ddcf1dc6108c8.zip
apply webhint suggestions
Diffstat (limited to 'vue.config.js')
-rw-r--r--vue.config.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/vue.config.js b/vue.config.js
index 6d8895c..ce3973e 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,5 +1,29 @@
// see https://cli.vuejs.org/config
+const CompressionPlugin = require("compression-webpack-plugin");
+const zopfli = require("@gfx/zopfli");
module.exports = {
//integrity: true, // enable SRI in script/style tags
+ parallel: true,
+ configureWebpack: {
+ plugins: [
+ new CompressionPlugin({
+ 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,
+ }),
+ new CompressionPlugin({
+ compressionOptions: {
+ numiterations: 15,
+ },
+ algorithm (input, compressionOptions, callback) {
+ return zopfli.gzip(input, compressionOptions, callback);
+ },
+ }),
+ ],
+ }
}