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:
Matthew Raymer
2025-07-15 06:13:33 +00:00
parent 6dea12bbaf
commit 6d4fb4f57a
23 changed files with 328 additions and 126 deletions

View File

@@ -22,7 +22,7 @@ npx vite --version
# Check environment variables
echo $VITE_PLATFORM
echo $VITE_PWA_ENABLED
echo "PWA: automatically enabled for web platforms"
```
### Build System Status
@@ -75,8 +75,8 @@ npm run build:web:dev
# Clear browser cache
# DevTools > Application > Storage > Clear site data
# Restart with PWA disabled
VITE_DISABLE_PWA=true npm run build:web:dev
# Restart development server
npm run build:web:dev
```
### Production Build Issues
@@ -414,11 +414,10 @@ ls -la .env*
# Set required variables
export VITE_PLATFORM=web
export VITE_PWA_ENABLED=true
# Check in build script
echo $VITE_PLATFORM
echo $VITE_PWA_ENABLED
echo "PWA: automatically enabled for web platforms"
```
#### Wrong Environment Loaded