Files
crowd-funder-from-jason/src/main.web.ts
Matthew Raymer 6d4fb4f57a 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.
2025-07-15 06:13:33 +00:00

21 lines
632 B
TypeScript

import { initializeApp } from "./main.common";
import { logger } from "./utils/logger";
const platform = process.env.VITE_PLATFORM;
// PWA service worker is automatically registered by VitePWA plugin
const app = initializeApp();
// Note: Worker initialization is now handled by WebPlatformService
// This ensures single-point database access and prevents double migrations
if (platform === "web" || platform === "development") {
logger.debug(
"[Web] Database initialization will be handled by WebPlatformService",
);
} else {
logger.debug("[Web] SQL not initialized for platform", { platform });
}
app.mount("#app");