mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-22 05:51:44 +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_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
||||||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
||||||
VITE_VERCEL_ENV: preview
|
VITE_VERCEL_ENV: preview
|
||||||
|
VITE_VERCEL_DEPLOY: true
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ env:
|
|||||||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
||||||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
||||||
VITE_VERCEL_ENV: production
|
VITE_VERCEL_ENV: production
|
||||||
|
VITE_VERCEL_DEPLOY: true
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ export default defineConfig({
|
|||||||
VitePWA({
|
VitePWA({
|
||||||
registerType: 'autoUpdate',
|
registerType: 'autoUpdate',
|
||||||
workbox: {
|
workbox: {
|
||||||
|
globPatterns: (process.env.VITE_VERCEL_DEPLOY ? ["**\/*.{css,html}"] : ["**\/*.{js,wasm,css,html}"]),
|
||||||
maximumFileSizeToCacheInBytes: 25 * 1024 ** 2,
|
maximumFileSizeToCacheInBytes: 25 * 1024 ** 2,
|
||||||
},
|
},
|
||||||
strategies: 'generateSW',
|
strategies: 'generateSW',
|
||||||
|
|||||||
Reference in new issue
Block a user