diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2024-04-05 06:57:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-05 06:57:12 -0700 |
commit | 9bfde58d78633fb1789001895b3443f0ba15e15b (patch) | |
tree | 6c6e93ef8b2bc3575a4c75983b87c10bf91dffd5 /modern | |
parent | c5dd2ce22c7782424ec6e8d6d710a7d5419aff01 (diff) | |
parent | cfa005ddca7b56334440d493c13c41a5401d4967 (diff) | |
download | trackermap-web-9bfde58d78633fb1789001895b3443f0ba15e15b.tar.gz trackermap-web-9bfde58d78633fb1789001895b3443f0ba15e15b.tar.bz2 trackermap-web-9bfde58d78633fb1789001895b3443f0ba15e15b.zip |
Merge pull request #1228 from jinzo/pwa-improvements
PWA fix and improvements
Diffstat (limited to 'modern')
-rw-r--r-- | modern/package-lock.json | 14 | ||||
-rw-r--r-- | modern/package.json | 2 | ||||
-rw-r--r-- | modern/vite.config.js | 3 |
3 files changed, 14 insertions, 5 deletions
diff --git a/modern/package-lock.json b/modern/package-lock.json index d5b717bf..ef2cd65e 100644 --- a/modern/package-lock.json +++ b/modern/package-lock.json @@ -38,7 +38,7 @@ "recharts": "^2.10.4", "redux": "^5.0.1", "vite": "^5.0.13", - "vite-plugin-pwa": "^0.17.4", + "vite-plugin-pwa": "^0.19.7", "vite-plugin-svgr": "^4.2.0", "wellknown": "^0.5.0" }, @@ -11185,9 +11185,9 @@ } }, "node_modules/vite-plugin-pwa": { - "version": "0.17.4", - "resolved": "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-0.17.4.tgz", - "integrity": "sha512-j9iiyinFOYyof4Zk3Q+DtmYyDVBDAi6PuMGNGq6uGI0pw7E+LNm9e+nQ2ep9obMP/kjdWwzilqUrlfVRj9OobA==", + "version": "0.19.7", + "resolved": "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-0.19.7.tgz", + "integrity": "sha512-18TECxoGPQE7tVZzKxbf5Icrl5688n1JGMPSgGotTsh89vLDxevY7ICfD3CFVfonZXh8ckuyJXg0NXE5+FAl2A==", "dependencies": { "debug": "^4.3.4", "fast-glob": "^3.3.2", @@ -11202,9 +11202,15 @@ "url": "https://github.com/sponsors/antfu" }, "peerDependencies": { + "@vite-pwa/assets-generator": "^0.2.4", "vite": "^3.1.0 || ^4.0.0 || ^5.0.0", "workbox-build": "^7.0.0", "workbox-window": "^7.0.0" + }, + "peerDependenciesMeta": { + "@vite-pwa/assets-generator": { + "optional": true + } } }, "node_modules/vite-plugin-svgr": { diff --git a/modern/package.json b/modern/package.json index 2fbdd5ac..c390a3e1 100644 --- a/modern/package.json +++ b/modern/package.json @@ -34,7 +34,7 @@ "recharts": "^2.10.4", "redux": "^5.0.1", "vite": "^5.0.13", - "vite-plugin-pwa": "^0.17.4", + "vite-plugin-pwa": "^0.19.7", "vite-plugin-svgr": "^4.2.0", "wellknown": "^0.5.0" }, diff --git a/modern/vite.config.js b/modern/vite.config.js index 9f6df445..47edf477 100644 --- a/modern/vite.config.js +++ b/modern/vite.config.js @@ -19,8 +19,11 @@ export default defineConfig(() => ({ svgr(), react(), VitePWA({ + includeAssets: ['favicon.ico', 'apple-touch-icon-180x180.png'], workbox: { navigateFallbackDenylist: [/^\/api/], + maximumFileSizeToCacheInBytes: 4000000, + globPatterns: ['**/*.{js,css,html,woff,woff2,mp3}'], }, manifest: { short_name: '${title}', |