From 6a629dd65bb871ed9ac3b94d12912415904ae45d Mon Sep 17 00:00:00 2001 From: zyronon Date: Wed, 27 Mar 2024 23:42:52 +0800 Subject: [PATCH] save --- vite.config.js | 79 +++++++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 40 deletions(-) diff --git a/vite.config.js b/vite.config.js index 0e47489..9b80af9 100644 --- a/vite.config.js +++ b/vite.config.js @@ -61,46 +61,45 @@ export default defineConfig({ } ], }), - // viteCompression({ - // verbose: false, - // disable: false, - // threshold: 10240, - // algorithm: 'brotliCompress', - // }), - // viteCompression({ - // verbose: false, - // disable: false, - // algorithm: 'gzip', - // threshold: 10240, - // }) - //图片压缩 - // viteImagemin({ - // gifsicle: { - // optimizationLevel: 7, - // interlaced: false, - // }, - // optipng: { - // optimizationLevel: 7, - // }, - // mozjpeg: { - // quality: 20, - // }, - // pngquant: { - // quality: [0.8, 0.9], - // speed: 4, - // }, - // svgo: { - // plugins: [ - // { - // name: 'removeViewBox', - // }, - // { - // name: 'removeEmptyAttrs', - // active: false, - // }, - // ], - // }, - // }), + viteCompression({ + verbose: false, + disable: false, + threshold: 10240, + algorithm: 'brotliCompress', + }), + viteCompression({ + verbose: false, + disable: false, + algorithm: 'gzip', + threshold: 10240, + }), + viteImagemin({ + gifsicle: { + optimizationLevel: 7, + interlaced: false, + }, + optipng: { + optimizationLevel: 7, + }, + mozjpeg: { + quality: 20, + }, + pngquant: { + quality: [0.8, 0.9], + speed: 4, + }, + svgo: { + plugins: [ + { + name: 'removeViewBox', + }, + { + name: 'removeEmptyAttrs', + active: false, + }, + ], + }, + }), ], resolve: { alias: {