tiny-rdm/frontend/src/main.js

27 lines
703 B
JavaScript
Raw Normal View History

2023-06-27 15:53:29 +08:00
import { createPinia } from 'pinia'
import { createApp } from 'vue'
import App from './App.vue'
import './styles/style.scss'
import dayjs from 'dayjs'
import duration from 'dayjs/plugin/duration'
import relativeTime from 'dayjs/plugin/relativeTime'
2023-08-20 15:33:51 +08:00
import { i18n } from '@/utils/i18n.js'
import { setupDiscreteApi } from '@/utils/discrete.js'
import usePreferencesStore from 'stores/preferences.js'
dayjs.extend(duration)
dayjs.extend(relativeTime)
2023-06-27 15:53:29 +08:00
async function setupApp() {
const app = createApp(App)
app.use(i18n)
app.use(createPinia())
const prefStore = usePreferencesStore()
await prefStore.loadPreferences()
await setupDiscreteApi()
app.mount('#app')
}
setupApp()