delete obsolte src/lib/pwa-register.d.ts
vite-plugin-pwa provides it's own typings so I added them to tsconfig
This commit is contained in:
parent
2e449f2b78
commit
05c56640fe
3 changed files with 2 additions and 19 deletions
17
src/lib/pwa-register.d.ts
vendored
17
src/lib/pwa-register.d.ts
vendored
|
@ -1,17 +0,0 @@
|
|||
declare module 'virtual:pwa-register/vue' {
|
||||
import type { Ref } from 'vue'
|
||||
|
||||
export interface RegisterSWOptions {
|
||||
immediate?: boolean
|
||||
onNeedRefresh?: () => void
|
||||
onOfflineReady?: () => void
|
||||
onRegistered?: (registration: ServiceWorkerRegistration | undefined) => void
|
||||
onRegisterError?: (error: any) => void
|
||||
}
|
||||
|
||||
export function useRegisterSW(options?: RegisterSWOptions): {
|
||||
needRefresh: Ref<boolean>
|
||||
offlineReady: Ref<boolean>
|
||||
updateServiceWorker: (reloadPage?: boolean) => Promise<void>
|
||||
}
|
||||
}
|
|
@ -16,7 +16,7 @@
|
|||
"allowSyntheticDefaultImports": true,
|
||||
"sourceMap": true,
|
||||
"baseUrl": "src",
|
||||
"types": ["vite/client"],
|
||||
"types": ["vite/client", "vite-plugin-pwa/vue"],
|
||||
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx"],
|
||||
|
|
|
@ -33,7 +33,7 @@ export default defineConfig({
|
|||
VitePWA({
|
||||
includeAssets: ["Logo.svg", "favicon.ico", "robots.txt", "apple-touch-icon.png"],
|
||||
workbox: {
|
||||
globPatterns: ['**/*.{js,css,html,ico,png,svg}']
|
||||
globPatterns: ["**/*.{js,css,html,ico,png,svg}"]
|
||||
},
|
||||
manifest: {
|
||||
name: projInfo.title,
|
||||
|
|
Loading…
Reference in a new issue