delay locales setup to avoid import error

This commit is contained in:
axolotle 2021-11-10 18:40:42 +01:00
parent bca25d8539
commit 827cca6273
4 changed files with 9 additions and 10 deletions

View file

@ -1,5 +1,5 @@
import i18n from '@/i18n'
import store from '@/store' import store from '@/store'
import i18n from '@/i18n'
import supportedLocales from './supportedLocales' import supportedLocales from './supportedLocales'
let dateFnsLocale let dateFnsLocale

View file

@ -5,12 +5,8 @@
import Vue from 'vue' import Vue from 'vue'
import VueI18n from 'vue-i18n' import VueI18n from 'vue-i18n'
import { initDefaultLocales } from './helpers'
// Plugin Initialization // Plugin Initialization
Vue.use(VueI18n) Vue.use(VueI18n)
export default new VueI18n({}) export default new VueI18n({})
// Load default locales translations files and setup store data
initDefaultLocales()

View file

@ -3,11 +3,12 @@ import App from './App.vue'
import BootstrapVue from 'bootstrap-vue' import BootstrapVue from 'bootstrap-vue'
import VueShowdown from 'vue-showdown' import VueShowdown from 'vue-showdown'
import i18n from './i18n'
import router from './router'
import store from './store' import store from './store'
import router from './router'
import i18n from './i18n'
import { registerGlobalErrorHandlers } from './api' import { registerGlobalErrorHandlers } from './api'
import { initDefaultLocales } from './i18n/helpers'
Vue.config.productionTip = false Vue.config.productionTip = false
@ -53,11 +54,13 @@ requireComponent.keys().forEach((fileName) => {
registerGlobalErrorHandlers() registerGlobalErrorHandlers()
// Load default locales translations files and setup store data
initDefaultLocales()
const app = new Vue({ const app = new Vue({
i18n,
router,
store, store,
router,
i18n,
render: h => h(App) render: h => h(App)
}) })

View file

@ -1,7 +1,7 @@
import Vue from 'vue' import Vue from 'vue'
import api from '@/api'
import router from '@/router' import router from '@/router'
import i18n from '@/i18n' import i18n from '@/i18n'
import api from '@/api'
import { timeout, isObjectLiteral } from '@/helpers/commons' import { timeout, isObjectLiteral } from '@/helpers/commons'
export default { export default {