add PWA support with vite-plugin-pwa, extract manifest to separate file#218
add PWA support with vite-plugin-pwa, extract manifest to separate file#218AduchiMergen wants to merge 2 commits into
Conversation
Co-authored-by: Kosta Korenkov <kosta@korenkov.net>
troggy
left a comment
There was a problem hiding this comment.
TLDR: this PR is strictly an improvement (e.g. caching app assets for offline use is amazing), though PWA is not yet fully usable (e.g. web+stellar links are not working). I'd merge and keep improving further.
Tested on desktop:
🟩 "Install app" badge visible in browser and works
🟩 App assets are cached with service worker and available offline (tested by setting Offline flag in Dev Tools > Application)
🟧 Setting web+stellar protocol handler keeps opening the website, not a PWA installed app. Not great, would love to see if it is fixable at least in theory
Tested on mobile (via loophole HTTPS site):
🟧 No "install app" prompt visible prompt. Can be installed as usual via menu. Not great, but manifest is used
🟩 App assets are cached with service worker and available offline (tested in Airplane mode)
🟥 Cannot set set protocol handler at all. Clicking either "Handle Stellar protocol requests" menu option or prompt on account view screen does nothing.
Testing notes:
Checkout and build for web:
git remote add aduchi git@github.com:AduchiMergen/sunce.git
git fetch aduchi
git checkout aduchi/PWA
npm install
npm run build:web
npx http-server -p 5002 dist
Run with https (in parallel with web part served from localhost:5002):
loophole http --hostname sunce-pwa-test 5002
| @@ -121,6 +121,7 @@ | |||
| "typescript": "^5.3.3", | |||
| "vite": "^6.2.1", | |||
| "vite-plugin-compression": "^0.5.1", | |||
| "vite-plugin-pwa": "^1.3.0", | |||
There was a problem hiding this comment.
need to sync package-lock with package.json (npm install will do)
|
ещё неплохо бы потестить авто-обновление:
Пользователь продолжит работать со старой версией до перезагрузки? cc @sozidatel |
|
@AduchiMergen порезолвишь конфликты? |
No description provided.