chore(Vercel): limit PWA precaching to avoid Fast Data Transfer exceed

This commit is contained in:
ShareVB committed 2025-11-08 09:32:04 +01:00
1 parent 814bae2897
commit 20f484c561
3 files changed
+3

No files matched your search

@@ -3,6 +3,7 @@ env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VITE_VERCEL_ENV: preview
VITE_VERCEL_DEPLOY: true
on:
push:
branches-ignore:
@@ -3,6 +3,7 @@ env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VITE_VERCEL_ENV: production
VITE_VERCEL_DEPLOY: true
on:
push:
branches:
+1
View File
@@ -64,6 +64,7 @@ export default defineConfig({
VitePWA({
registerType: 'autoUpdate',
workbox: {
globPatterns: (process.env.VITE_VERCEL_DEPLOY ? ["**\/*.{css,html}"] : ["**\/*.{js,wasm,css,html}"]),
maximumFileSizeToCacheInBytes: 25 * 1024 ** 2,
},
strategies: 'generateSW',