forked from trent_larson/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:
@@ -72,7 +72,7 @@ docker build --build-arg BUILD_MODE=development -t timesafari:dev .
|
||||
docker build \
|
||||
--build-arg BUILD_MODE=staging \
|
||||
--build-arg NODE_ENV=staging \
|
||||
--build-arg VITE_PWA_ENABLED=true \
|
||||
|
||||
-t timesafari:custom .
|
||||
```
|
||||
|
||||
@@ -103,8 +103,7 @@ The Dockerfile supports these build arguments:
|
||||
| `BUILD_MODE` | `production` | Build mode: development, staging, or production |
|
||||
| `NODE_ENV` | `production` | Node.js environment |
|
||||
| `VITE_PLATFORM` | `web` | Vite platform type |
|
||||
| `VITE_PWA_ENABLED` | `true` | Enable PWA features |
|
||||
| `VITE_DISABLE_PWA` | `false` | Disable PWA features |
|
||||
| PWA | `enabled` | Automatically enabled for web platforms |
|
||||
|
||||
### Environment Variables
|
||||
|
||||
@@ -115,8 +114,7 @@ Docker Compose supports these environment variables:
|
||||
| `BUILD_MODE` | `production` | Build mode |
|
||||
| `NODE_ENV` | `production` | Node environment |
|
||||
| `VITE_PLATFORM` | `web` | Vite platform |
|
||||
| `VITE_PWA_ENABLED` | `true` | Enable PWA |
|
||||
| `VITE_DISABLE_PWA` | `false` | Disable PWA |
|
||||
| PWA | `enabled` | Automatically enabled for web platforms |
|
||||
| `DEV_PORT` | `5173` | Development port |
|
||||
| `STAGING_PORT` | `8080` | Staging port |
|
||||
| `PROD_PORT` | `80` | Production port |
|
||||
@@ -214,7 +212,7 @@ BUILD_MODE=staging NODE_ENV=staging ./docker/run.sh custom
|
||||
docker build \
|
||||
--build-arg BUILD_MODE=staging \
|
||||
--build-arg NODE_ENV=staging \
|
||||
--build-arg VITE_PWA_ENABLED=false \
|
||||
|
||||
-t timesafari:staging-no-pwa .
|
||||
|
||||
# Run with custom configuration
|
||||
|
||||
Reference in New Issue
Block a user