-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
36 lines (29 loc) · 858 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import VeeValidatePlugin from './includes/validation'
import { auth } from './includes/firebase'
import Icon from './directives/icon'
import i18n from './includes/i18n'
import { registerSW } from 'virtual:pwa-register'
import GlobalComponents from './includes/_globals'
import progressBar from './includes/progress-bar'
import './assets/base.css'
import './assets/main.css'
import 'nprogress/nprogress.css'
registerSW({ immediate: true })
progressBar(router)
let app
auth.onAuthStateChanged(() => {
if (!app) {
app = createApp(App)
app.use(createPinia())
app.use(router)
app.use(VeeValidatePlugin)
app.use(i18n)
app.use(GlobalComponents)
app.directive('icon', Icon)
app.mount('#app')
}
})