refactor: remove legacy service worker and manifest, integrate Vite PWA plugin
Some checks failed
Docker Build & Deploy / Build Docker Image (push) Failing after 40s
Docker Build & Deploy / Deploy to Production (push) Has been skipped
Docker Build & Deploy / Cleanup Dangling Images (push) Has been skipped

- Deleted the old service worker implementation and manifest file.
- Integrated Vite PWA plugin for improved service worker management.
- Updated main.js to remove service worker registration logic.
- Refactored registerServiceWorker.js to use the new PWA registration method.
- Added new service worker (sw.js) with caching strategies for API and static resources.
- Updated vite.config.js to include PWA configuration and manifest details.
This commit is contained in:
孙诚
2026-01-07 15:32:22 +08:00
parent 1bd6b688c1
commit 0c09d7aa14
8 changed files with 3013 additions and 347 deletions

View File

@@ -30,6 +30,11 @@
"globals": "^16.5.0",
"prettier": "3.6.2",
"vite": "^7.2.4",
"vite-plugin-vue-devtools": "^8.0.5"
"vite-plugin-pwa": "^1.2.0",
"vite-plugin-vue-devtools": "^8.0.5",
"workbox-expiration": "^7.4.0",
"workbox-precaching": "^7.4.0",
"workbox-routing": "^7.4.0",
"workbox-strategies": "^7.4.0"
}
}