-
Notifications
You must be signed in to change notification settings - Fork 0
/
pwa-assets.config.ts
38 lines (35 loc) · 821 Bytes
/
pwa-assets.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
import {
createAppleSplashScreens,
defineConfig,
minimal2023Preset,
} from '@vite-pwa/assets-generator/config'
let image = 'static/favicon.svg'
switch (process.env.PPOCGEN_ENV) {
case 'production':
image = 'static/favicon.svg'
break;
case 'staging':
image = 'static/staging.svg'
break;
default:
image = 'static/localhost.svg'
}
export default defineConfig({
headLinkOptions: {
preset: '2023',
},
preset: {
...minimal2023Preset,
appleSplashScreens: createAppleSplashScreens({
padding: 0.3,
resizeOptions: { fit: 'contain', background: 'white' },
darkResizeOptions: { fit: 'contain', background: 'black' },
linkMediaOptions: {
log: true,
addMediaScreen: true,
xhtml: true,
},
}, ['iPad Air 9.7"']),
},
images: image,
})