feat: pages support Cloudflare Zero Trust (#477)

This commit is contained in:
Dream Hunter
2024-11-11 23:55:49 +08:00
committed by GitHub
parent 6c82efb738
commit 5ff2ceb5e8
4 changed files with 6 additions and 2 deletions

View File

@@ -5,7 +5,9 @@ import router from './router'
import { registerSW } from 'virtual:pwa-register'
import { createHead } from '@unhead/vue'
registerSW({ immediate: true })
const disablePwa = import.meta.env.VITE_PWA_DISABLED === 'true';
if (!disablePwa) registerSW({ immediate: true })
const i18n = createI18n({
legacy: false, // you must set `false`, to use Composition API
locale: 'zh', // set locale