-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.js
43 lines (42 loc) · 892 Bytes
/
vite.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { defineConfig } from 'vite'
import elmPlugin from 'vite-plugin-elm'
import { ViteWebfontDownload } from 'vite-plugin-webfont-dl'
import viteImagemin from 'vite-plugin-imagemin'
import viteCompression from 'vite-plugin-compression'
export default defineConfig({
build: {
target: 'esnext'
},
plugins: [
elmPlugin(),
ViteWebfontDownload(),
viteImagemin({
gifsicle: {
optimizationLevel: 3,
interlaced: false
},
optipng: {
optimizationLevel: 7
},
mozjpeg: {
quality: 80,
progressive: true
},
pngquant: {
quality: [0.8, 0.9],
speed: 10
},
svgo: {
plugins: ['preset-default']
},
webp: {
quality: 80,
method: 4,
nearLossless: 95
}
}),
viteCompression({
algorithm: 'brotliCompress'
})
]
})