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:
@@ -20,8 +20,7 @@
|
||||
*
|
||||
* Environment Variables:
|
||||
* - VITE_PLATFORM: Set to "electron"
|
||||
* - VITE_PWA_ENABLED: Disabled for desktop
|
||||
* - VITE_DISABLE_PWA: Enabled for desktop
|
||||
* - PWA: Disabled for desktop (via build exclusion)
|
||||
*/
|
||||
|
||||
import { defineConfig } from "vite";
|
||||
@@ -140,8 +139,8 @@ export default defineConfig(async () => {
|
||||
define: {
|
||||
...baseConfig.define,
|
||||
'process.env.VITE_PLATFORM': JSON.stringify('electron'),
|
||||
'process.env.VITE_PWA_ENABLED': JSON.stringify(false),
|
||||
'process.env.VITE_DISABLE_PWA': JSON.stringify(true),
|
||||
|
||||
|
||||
// Electron-specific flags
|
||||
'__ELECTRON__': JSON.stringify(true),
|
||||
'__IS_DESKTOP__': JSON.stringify(true),
|
||||
|
||||
Reference in New Issue
Block a user