generated from aryanxarora/vite-pwa-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts
75 lines (73 loc) · 1.63 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import { defineConfig } from "vitest/config"
import react from "@vitejs/plugin-react"
import { VitePWA, VitePWAOptions } from "vite-plugin-pwa";
const manifestPWA: Partial<VitePWAOptions> = {
registerType: "prompt",
includeAssets: ["vite.svg"],
manifest: {
"name": "Diro's World",
"short_name": "Diro's World",
"start_url": "/",
"display": "standalone",
"background_color": "#4F4A4E",
"lang": "en",
"scope": "/",
"id": "diro",
"theme_color": "#4F4A4E",
"description": "The mystical world of Diro",
"icons": [
{
"src": "/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/icon-256x256.png",
"sizes": "256x256",
"type": "image/png"
},
{
"src": "/icon-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "/icon-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any"
},
{
"src": "/maskable_icon_x192",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
}
],
"categories": [
"productivity",
"utilities"
],
"orientation": "portrait",
"display_override": [
"standalone",
"fullscreen",
"window-controls-overlay",
"minimal-ui",
"browser"
]
}
}
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), VitePWA(manifestPWA)],
server: {
open: true,
},
test: {
globals: true,
environment: "jsdom",
setupFiles: "src/setupTests",
mockReset: true,
},
})