forked from lecepin/gen-brand-photo-pictrue
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathvite.config.ts
53 lines (52 loc) · 1.09 KB
/
vite.config.ts
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
44
45
46
47
48
49
50
51
52
53
import react from '@vitejs/plugin-react'
import { visualizer } from 'rollup-plugin-visualizer'
import { defineConfig } from 'vite'
import { ViteImageOptimizer } from 'vite-plugin-image-optimizer'
import { VitePWA } from 'vite-plugin-pwa'
import topLevelAwait from 'vite-plugin-top-level-await'
import wasm from 'vite-plugin-wasm'
export default defineConfig({
plugins: [
react(),
wasm(),
topLevelAwait(),
VitePWA(),
visualizer({ open: false }),
ViteImageOptimizer({
test: /\.(jpe?g|png|gif|tiff|webp|svg|avif)$/i,
includePublic: true,
logStats: true,
ansiColors: true,
png: {
quality: 100,
},
jpeg: {
quality: 100,
},
jpg: {
quality: 100,
},
tiff: {
quality: 100,
},
gif: {},
webp: {
lossless: true,
},
avif: {
lossless: true,
},
}),
],
server: {
port: 3000,
},
build: {
outDir: 'dist',
target: 'esnext',
},
optimizeDeps: {
exclude: ['picseal'],
},
// base: 'https://zhiweio.github.io/picseal/',
})