vite.manifest.config.ts
⎇
Raw
1import type { VitePWAOptions } from "vite-plugin-pwa";
2
3export const pwaOptions: Partial<VitePWAOptions> = {
4 registerType: "autoUpdate",
5 workbox: {
6 globPatterns: ["**/*.{js,wasm,css,html,woff2}"],
7 navigateFallback: undefined,
8 runtimeCaching: [
9 {
10 urlPattern: () => true,
11 handler: "NetworkOnly",
12 },
13 ],
14 },
15 manifest: {
16 name: "Pico Pixel Player",
17 description: "A directory based audio player with offline functionality",
18 theme_color: "#3f4d4e",
19 screenshots: [
20 {
21 src: "/assets/screenshot-narrow.png",
22 form_factor: "narrow",
23 sizes: "2302x1921",
24 },
25 {
26 src: "/assets/screenshot-wide.png",
27 form_factor: "wide",
28 sizes: "2302x1278",
29 },
30 ],
31 background_color: "#3f4d4e",
32 icons: [
33 {
34 src: "/assets/favicon-any.svg",
35 sizes: "any",
36 type: "image/svg+xml",
37 purpose: "any",
38 },
39 {
40 src: "/assets/favicon-maskable.svg",
41 sizes: "any",
42 type: "image/svg+xml",
43 purpose: "maskable",
44 },
45 {
46 //Android
47 src: "/assets/favicon-192x192.png",
48 sizes: "192x192",
49 type: "image/png",
50 purpose: "maskable",
51 },
52 {
53 //iOS
54 src: "/assets/favicon-180x180.png",
55 sizes: "180x180",
56 type: "image/png",
57 purpose: "maskable",
58 },
59 ],
60 display: "standalone",
61 display_override: ["standalone", "minimal-ui", "fullscreen"],
62 },
63};
64