forked from commaai/new-connect
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpwa-assets.config.ts
More file actions
34 lines (33 loc) · 977 Bytes
/
pwa-assets.config.ts
File metadata and controls
34 lines (33 loc) · 977 Bytes
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
import { createAppleSplashScreens, defineConfig, minimal2023Preset } from '@vite-pwa/assets-generator/config'
export default defineConfig({
headLinkOptions: {
preset: '2023',
xhtml: true,
},
preset: {
...minimal2023Preset,
maskable: {
...minimal2023Preset.maskable,
padding: 0.2,
resizeOptions: { background: '#131318' },
},
apple: {
...minimal2023Preset.apple,
padding: 0.2,
resizeOptions: { background: '#131318' },
},
appleSplashScreens: createAppleSplashScreens({
padding: 0.5,
resizeOptions: { fit: 'contain', background: '#131318' },
linkMediaOptions: {
addMediaScreen: true,
xhtml: true,
},
name: (landscape, size) => {
// make sure to update when generating light/dark variants
return `apple-splash-${landscape ? 'landscape' : 'portrait'}-${size.width}x${size.height}.png`
},
}),
},
images: ['public/favicon.svg'],
})