Fix PWA install scope

This commit is contained in:
Jeppe Bundgaard
2026-06-08 20:56:32 +02:00
parent f5b7da7b0a
commit f7f749e230
+1 -2
View File
@@ -526,7 +526,7 @@ export default defineConfig(({ mode }) => {
// Server version updates happen after deploy verification, not during asset builds.
// Keep production assets host-agnostic. Release channel prefixes are resolved at runtime.
const base = isProd ? releaseFrontendBasePath() : '/'
const pwaScope = base === './' ? '.' : base
const pwaScope = base === './' ? '/' : base
// Enable single-file build only when explicitly requested (disabled by default for PWA)
const enableSingleFile = process.env.VITE_SINGLE_FILE === 'true' && !isProd
@@ -613,7 +613,6 @@ export default defineConfig(({ mode }) => {
description: 'Access your Truck Wash accounts and transactions from anywhere.',
theme_color: '#063651',
background_color: '#0787bb',
// Use relative scope when base is relative
start_url: pwaScope,
scope: pwaScope,
display: 'standalone',