mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
chore(Vercel): limit PWA precaching to avoid Fast Data Transfer exceed
This commit is contained in:
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:
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in new issue
Block a user