-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
46 lines (45 loc) · 1.93 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
import { defineConfig, searchForWorkspaceRoot} from 'vite'
import react from '@vitejs/plugin-react-swc'
import { VitePWA } from 'vite-plugin-pwa'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
VitePWA({
mode: "production",
minify: true,
manifest: {
start_url: "/json-ops/",
orientation: "portrait",
name: "Json Comparison",
background_color: "#448aff",
theme_color: "#0072f4",
display: "standalone",
icons: [
{ src: "/json-ops/icons/maskable_icon_x48.png", type: "image/png", sizes: "48x48", purpose: "maskable" },
{ src: "/json-ops/icons/maskable_icon_x72.png", type: "image/png", sizes: "72x72", purpose: "maskable" },
{ src: "/json-ops/icons/maskable_icon_x96.png", type: "image/png", sizes: "96x96", purpose: "maskable" },
{ src: "/json-ops/icons/maskable_icon_x128.png", type: "image/png", sizes: "128x128", purpose: "maskable" },
{ src: "/json-ops/icons/maskable_icon_x192.png", type: "image/png", sizes: "192x192", purpose: "maskable" },
{ src: "/json-ops/icons/maskable_icon_x384.png", type: "image/png", sizes: "384x384", purpose: "maskable" },
{ src: "/json-ops/icons/maskable_icon_x512.png", type: "image/png", sizes: "512x512", purpose: "maskable" },
{ src: "/json-ops/icons/maskable_icon.png", type: "image/png", sizes: "1024x1024", purpose: "maskable" },
{ src: "/json-ops/icons/maskable_icon.png", type: "image/png", sizes: "1024x1024" },
{ src: "/json-ops/icon.svg", type: "image/png", sizes: "320x320" },
]
},
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg}']
},
registerType: 'autoUpdate',
devOptions: {
enabled: false
}
})
],
server: {
fs: {
allow: [searchForWorkspaceRoot(process.cwd()), '/home/grayhat/desktop/github/personal/useWorker/']
}
}
})