summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAnderson Shindy Oki <[email protected]>2024-07-08 12:49:01 +0900
committerAnderson Shindy Oki <[email protected]>2024-07-08 12:49:01 +0900
commit5886c20c9c7929bf46836a99c2d9d4eb834638bd (patch)
treebfc90e4b55fa0f48f83e51c4e5947c1f7d7d7a2d
parent0f14a33c7354df57054c7c1b56dc0746ec4fce3e (diff)
downloadbazarr-5886c20c9c7929bf46836a99c2d9d4eb834638bd.tar.gz
bazarr-5886c20c9c7929bf46836a99c2d9d4eb834638bd.zip
Fixed PWA image path on development buildv1.4.4-beta.19
-rw-r--r--frontend/vite.config.ts20
1 files changed, 11 insertions, 9 deletions
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",