mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-03 19:48:11 +00:00
pwa: automatyczny reload
This commit is contained in:
+11
-3
@@ -1,10 +1,18 @@
|
||||
import { createApp } from 'vue';
|
||||
import { createPinia } from 'pinia';
|
||||
import { registerSW } from 'virtual:pwa-register';
|
||||
|
||||
import App from './App.vue';
|
||||
|
||||
const pinia = createPinia();
|
||||
|
||||
createApp(App)
|
||||
.use(pinia)
|
||||
.mount('#app');
|
||||
const updateSW = registerSW({
|
||||
onOfflineReady() {},
|
||||
|
||||
onNeedRefresh() {
|
||||
console.log('Need refresh!');
|
||||
},
|
||||
});
|
||||
|
||||
createApp(App).use(pinia).mount('#app');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user