diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index d6422ce4a..d6c625441 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -23,6 +23,8 @@ export default defineConfig(async ({ mode, command }) => { const ws = env.VITE_ALLOW_WEBSOCKET === "true"; const secure = env.VITE_PROXY_SECURE === "true"; + const imagesFolder = mode === "development" ? "public/images" : "images"; + return { plugins: [ react(), @@ -36,8 +38,8 @@ export default defineConfig(async ({ mode, command }) => { VitePWA({ registerType: "autoUpdate", includeAssets: [ - "/images/favicon.ico", - "/images/apple-touch-icon-180x180.png", + `${imagesFolder}/favicon.ico`, + `${imagesFolder}/apple-touch-icon-180x180.png`, ], manifest: { name: "Bazarr", @@ -47,45 +49,45 @@ export default defineConfig(async ({ mode, command }) => { theme_color: "#be4bdb", icons: [ { - src: "/images/pwa-64x64.png", + src: `${imagesFolder}/pwa-64x64.png`, sizes: "64x64", type: "image/png", }, { - src: "/images/pwa-192x192.png", + src: `${imagesFolder}/pwa-192x192.png`, sizes: "192x192", type: "image/png", }, { - src: "/images/pwa-512x512.png", + src: `${imagesFolder}/pwa-512x512.png`, sizes: "512x512", type: "image/png", }, ], screenshots: [ { - src: "/images/pwa-wide-series-list.jpeg", + src: `/${imagesFolder}/pwa-wide-series-list.jpeg`, sizes: "1447x1060", label: "Series List", form_factor: "wide", type: "image/jpeg", }, { - src: "/images/pwa-wide-series-overview.jpeg", + src: `/${imagesFolder}/pwa-wide-series-overview.jpeg`, sizes: "1447x1060", label: "Series Overview", form_factor: "wide", type: "image/jpeg", }, { - src: "/images/pwa-narrow-series-list.jpeg", + src: `/${imagesFolder}/pwa-narrow-series-list.jpeg`, sizes: "491x973", label: "Series List", form_factor: "narrow", type: "image/jpeg", }, { - src: "/images/pwa-narrow-series-overview.jpeg", + src: `/${imagesFolder}/pwa-narrow-series-overview.jpeg`, sizes: "491x973", label: "Series Overview", form_factor: "narrow",