chore(pwa): remove debug warnings in browser console (#1441)

This commit is contained in:
Stefan Dej 2023-06-25 00:01:48 +02:00 committed by GitHub
parent 73e503fc64
commit 2962df21e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2135 additions and 1516 deletions

3644
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -94,13 +94,13 @@
"vite": "^3.2.7", "vite": "^3.2.7",
"vite-plugin-checker": "^0.5.0", "vite-plugin-checker": "^0.5.0",
"vite-plugin-package-version": "^1.0.2", "vite-plugin-package-version": "^1.0.2",
"vite-plugin-pwa": "^0.13.0", "vite-plugin-pwa": "^0.16.4",
"vite-plugin-vue2": "^2.0.1", "vite-plugin-vue2": "^2.0.1",
"vue-debounce-decorator": "^1.0.1", "vue-debounce-decorator": "^1.0.1",
"vue-i18n-extract": "^2.0.7", "vue-i18n-extract": "^2.0.7",
"vue-router": "^3.5.2", "vue-router": "^3.5.2",
"vue-template-compiler": "^2.6.14", "vue-template-compiler": "^2.6.14",
"workbox-core": "^6.4.2" "workbox-core": "^7.0.0"
}, },
"postcss": { "postcss": {
"plugins": { "plugins": {

View File

@ -12,7 +12,6 @@ import { VitePWA, VitePWAOptions } from 'vite-plugin-pwa'
const PWAConfig: Partial<VitePWAOptions> = { const PWAConfig: Partial<VitePWAOptions> = {
registerType: 'autoUpdate', registerType: 'autoUpdate',
strategies: 'injectManifest',
srcDir: 'src', srcDir: 'src',
filename: 'sw.ts', filename: 'sw.ts',
includeAssets: ['fonts/**/*.woff2', 'img/**/*.svg', 'img/**/*.png'], includeAssets: ['fonts/**/*.woff2', 'img/**/*.svg', 'img/**/*.png'],
@ -52,11 +51,13 @@ const PWAConfig: Partial<VitePWAOptions> = {
}, },
}, },
], ],
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024,
}, },
/* enable sw on development */ /* enable sw on development */
devOptions: { devOptions: {
enabled: true, enabled: true,
type: 'module', type: 'module',
suppressWarnings: true,
}, },
} }