Add basic PWA support (#38) (#210)

* Add basic PWA support

See: https://github.com/gpxstudio/gpx.studio/issues/38

This will add a basic manifest.json file to the response that creates an
installable PWA.

It still needs to be internationalized.

* Refactor PWA integration and update dependencies

- Removed @vite-pwa/sveltekit dependency and related configurations from package.json and vite.config.ts.
- Added prebuild script to generate PWA manifest before build.
- Moved the manifest link to hooks.server.js and included Apple touch icon.
-Added images for various platforms. Images were generated with https://www.pwabuilder.com/imageGenerator

* use svg icon, fix urls, and remove generated manifest files

---------

Co-authored-by: jonherman <jonherman@gmail.com>
Co-authored-by: vcoppe <vianney.coppe@gmail.com>
This commit is contained in:
Jon Herman
2025-05-08 09:23:07 -07:00
committed by GitHub
parent e4f6dfbf78
commit 4e9d65089c
6 changed files with 641 additions and 156 deletions

View File

@@ -5,6 +5,7 @@
"scripts": {
"dev": "vite dev",
"build": "vite build",
"prebuild": "npx tsx src/lib/pwa-manifest.ts",
"postbuild": "npx tsx src/lib/sitemap.ts",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",