-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
118 lines (115 loc) · 2.56 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { VitePWA } from 'vite-plugin-pwa';
const manifestForPlugIn :any= {
registerType:'prompt',
workbox: {
clientsClaim: true,
skipWaiting: true,
runtimeCaching: [
{
urlPattern: /.*\.(?:png|jpg|jpeg|svg|gif)/,
handler: 'CacheFirst',
options: {
cacheName: 'images',
expiration: { maxEntries: 10, maxAgeSeconds: 60 * 60 * 24 * 30 }
}
}
]
},
includeAssests:['favicon.ico', "apple-touc-icon.png", "masked-icon.svg",'icon.png'],
manifest:{
name:"The Freeboard App",
short_name:"Freeboard",
description:"The Freeboard App",
screenshots: [
{
src: "/assets/screenshots/1.png",
sizes: "1080x1920",
type: "image/png"
},
{
src: "/assets/screenshots/2.png",
sizes: "1080x1920",
type: "image/png"
}
],
icons:[
{
src: '/icon-192x192-maskable.png',
sizes:'192x192',
type:'image/png',
purpose:'maskable'
},
{
src:'/icon_512.png',
sizes:'512x512',
type:'image/png',
purpose:'maskable'
},
{
src: "/icon_192..png", // رمز عادي
sizes: "192x192",
type: "image/png",
purpose: "any"
},
{
src: "/icon-512x512.png", // رمز عادي
sizes: "512x512",
type: "image/png",
purpose: "any"
},
{
src: '/apple-touch-icon.png',
sizes:'180x180',
type:'image/png',
purpose:'apple touch icon',
},
{
src: '/maskable_icon.png',
sizes:'512x512',
type:'image/png',
purpose:'maskable',
},
{
src: '/icon.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any'
}
],
id:'/',
theme_color:'#242424',
background_color:'#242424',
display:"standalone",
scope:'/',
start_url:"/",
orientation:'portrait',
launch_handler: {
route_to: 'existing-client-instance',
client_mode: "auto"
},
devOptions: {
enabled: true
},
categories: [
"productivity",
"tools",
"PWA",
"web-app"
],
dir: "rtl",
iarc_rating_id: "01cf9477-0248-4fb3-b4ec-da48a4b393d4",
prefer_related_applications: false,
gcm_sender_id: "",
scope_extensions: [
{
origin: "https://the-freeboard-app.vercel.app"
}
]
}
}
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(),VitePWA(manifestForPlugIn)],
})