Homepage-imsyy/src/main.js
2023-01-15 17:47:35 +08:00

27 lines
657 B
JavaScript

import {
createApp
} from 'vue';
import '@/style/style.scss';
import App from '@/App.vue';
// 引入 pinia
import {
createPinia
} from 'pinia';
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
const app = createApp(App);
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);
app.use(pinia);
app.mount('#app')
// if ('serviceWorker' in navigator) {
// navigator.serviceWorker.register('/sw.js')
// .then(() => {
// console.log('Service worker registered.');
// })
// .catch(err => {
// console.log('Failed to register service worker: ', err);
// });
// }