forked from jsnbuchanan/crowd-funder-for-time-pwa
Remove manual service worker registration; rely on VitePWA auto-registration
- Deleted src/registerServiceWorker.ts and all related imports - Cleaned up WebPlatformService and main.web.ts to remove manual SW logic - Updated VitePWA config for correct dev/prod SW handling - Fixed missing FontAwesome download icon in PWA prompt - Updated docs to reflect new PWA registration approach PWA now works reliably in all web environments with zero manual SW code.
This commit is contained in:
@@ -647,13 +647,13 @@ export class WebPlatformService implements PlatformService {
|
||||
|
||||
// --- PWA/Web-only methods ---
|
||||
public registerServiceWorker(): void {
|
||||
if (this.isPWAEnabled) {
|
||||
import("@/registerServiceWorker");
|
||||
}
|
||||
// PWA service worker is automatically registered by VitePWA plugin
|
||||
// No manual registration needed
|
||||
}
|
||||
|
||||
public get isPWAEnabled(): boolean {
|
||||
return process.env.VITE_PWA_ENABLED === "true";
|
||||
// PWA is always enabled for web platform
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user