fix: remove pwa to fix cdn conflict

This commit is contained in:
YunYouJun
2022-06-27 08:49:55 +08:00
parent 7b94e19b20
commit fe47e4d2e7
8 changed files with 50 additions and 1866 deletions

View File

@@ -1,12 +1,13 @@
import { type UserModule } from '~/types'
// https://github.com/antfu/vite-plugin-pwa#automatic-reload-when-new-content-available
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const install: UserModule = ({ isClient, router }) => {
if (!isClient)
return
// if (!isClient)
// return
router.isReady().then(async () => {
const { registerSW } = await import('virtual:pwa-register')
registerSW({ immediate: true })
})
// router.isReady().then(async () => {
// const { registerSW } = await import('virtual:pwa-register')
// registerSW({ immediate: true })
// })
}