chore: update vite-plugin-pwa

This commit is contained in:
Joaquín Sánchez Jiménez committed 2021-03-25 18:44:16 +01:00
1 parent 32676ae335
commit 58ceb77b06
5 files changed
+156 -105

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
import { UserModule } from '~/types'
export const install: UserModule = ({ isClient, router }) => {
if (isClient) {
router.isReady().then(async() => {
if (isClient) {
const { registerSW } = await import('virtual:pwa-register')
registerSW({ immediate: true })
}
})
}
}