Files
vitesse/src/modules/sw.ts
T
userquin b7824239a8 chore: update pwa plugin dep (#104)
* chore: update pwa plugin dep

* chore: clean up
2021-03-29 01:02:09 +09:00

11 lines
275 B
TypeScript

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