File tree 2 files changed +12
-2
lines changed
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 66
66
"typescript" : " 5.1.6" ,
67
67
"unplugin-auto-import" : " ^0.16.0" ,
68
68
"vite" : " ^4.2.1" ,
69
+ "vite-plugin-compression" : " ^0.5.1" ,
69
70
"vite-plugin-eslint" : " ^1.8.1" ,
70
71
"vite-plugin-html" : " ^3.2.0" ,
71
72
"vite-plugin-vue-setup-extend-plus" : " ^0.1.0" ,
Original file line number Diff line number Diff line change 3
3
* @version :
4
4
* @Author : June
5
5
* @Date : 2023-04-24 00:25:39
6
- * @LastEditors : 秦少卫
7
- * @LastEditTime : 2024-07-16 14:51:54
6
+ * @LastEditors : June
7
+ * @LastEditTime : 2024-10-09 23:57:48
8
8
*/
9
9
import { defineConfig , loadEnv } from 'vite' ;
10
10
import vue from '@vitejs/plugin-vue' ;
@@ -16,6 +16,7 @@ import autoImports from 'unplugin-auto-import/vite';
16
16
import { resolve } from 'path' ;
17
17
import autoprefixer from 'autoprefixer' ;
18
18
import svgLoader from 'vite-svg-loader' ;
19
+ import viteCompression from 'vite-plugin-compression' ;
19
20
20
21
const config = ( { mode } ) => {
21
22
const isProd = mode === 'production' ;
@@ -49,6 +50,14 @@ const config = ({ mode }) => {
49
50
} ,
50
51
} ) ,
51
52
svgLoader ( ) ,
53
+ viteCompression ( {
54
+ verbose : true ,
55
+ disable : false ,
56
+ deleteOriginFile : false ,
57
+ threshold : 5120 ,
58
+ algorithm : 'gzip' ,
59
+ ext : '.gz' ,
60
+ } ) ,
52
61
] ,
53
62
build : {
54
63
target : 'es2015' ,
You can’t perform that action at this time.
0 commit comments