fix: Remove vite-plugin-pwa, avoid this plugin caches files unexpectedly#6907
Merged
fix: Remove vite-plugin-pwa, avoid this plugin caches files unexpectedly#6907
Conversation
Replace the vite-plugin-pwa build pipeline with a simple static service worker (public/sw.js) that only handles push notifications. This removes the Workbox precaching that was causing favicon/manifest caching issues (#6902) while keeping webpush notifications working. Changes: - Create public/sw.js with push notification handler - Register service worker in src/main.js - Remove VitePWA plugin from vite config - Delete src/serviceWorker.ts - Uninstall vite-plugin-pwa dependency Co-authored-by: louislam <1336778+louislam@users.noreply.github.com>
Co-authored-by: louislam <1336778+louislam@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove vite-plugin-pwa while retaining web push and service worker functionality
Remove vite-plugin-pwa, keep service worker for webpush
Feb 11, 2026
Owner
|
The change looks solid. Need manual test. |
1 task
Owner
Owner
|
Oh, wait, why it is "undefined". |
Owner
|
Fixed along with this pr, I believe it is because there was no final manual test in #6421. Let's just keep it simple, we should just use
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


vite-plugin-pwaintroduces Workbox precaching that aggressively caches frontend assets (including default icons/manifest), causing status pages to serve stale favicons instead of custom ones after the first load.The plugin was added solely for webpush notification support, but webpush only needs a service worker that listens for
pushevents — it doesn't need Workbox or precaching.Changes
public/sw.js— New static service worker with only the push notification event handler (no Workbox, no precaching)src/main.js— Register the service worker explicitly on app loadconfig/vite.config.js— RemoveVitePWApluginsrc/serviceWorker.ts— Deleted (was only needed as vite-plugin-pwa's injectManifest input)package.json— Uninstallvite-plugin-pwaService worker (entire file)
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.