PWA支持
This commit is contained in:
@@ -9,6 +9,9 @@ import vant from 'vant'
|
||||
import { ConfigProvider } from 'vant';
|
||||
import 'vant/lib/index.css'
|
||||
|
||||
// 注册 Service Worker
|
||||
import { register } from './registerServiceWorker'
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
app.use(createPinia())
|
||||
@@ -17,3 +20,8 @@ app.use(vant)
|
||||
app.use(ConfigProvider);
|
||||
|
||||
app.mount('#app')
|
||||
|
||||
// 在生产环境注册 Service Worker
|
||||
if (import.meta.env.PROD) {
|
||||
register()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user