Migrate to Vite (#71)

* Replace DateInput

* Migrate to Vite

* Ecxluding optimize to fix notifs in dev

* Dateinput changes

* Fixs on new DateInput

* wip

* Updated date input + cleaning

* Udpated readme

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
Chirag
2023-01-21 17:27:37 +05:30
committed by GitHub
parent b9d50bc096
commit 970893329b
488 changed files with 1397 additions and 10491 deletions

View File

@@ -14,8 +14,11 @@ const i18n = new VueI18n({
*/
export async function loadMessages (locale) {
if (Object.keys(i18n.getLocaleMessage(locale)).length === 0) {
const messages = await import(/* webpackChunkName: '' */ `~/lang/${locale}`)
i18n.setLocaleMessage(locale, messages)
if (locale) {
const langFiles = import.meta.glob('../lang/**.json', {eager: true})
const messages = langFiles[`../lang/${locale}.json`]
i18n.setLocaleMessage(locale, messages)
}
}
if (i18n.locale !== locale) {

View File

@@ -1,8 +1,8 @@
import Vue from 'vue'
const axios = require('axios')
import axios from "axios"
const assetUrl = process.env.MIX_VAPOR_ASSET_URL
? process.env.MIX_VAPOR_ASSET_URL
const assetUrl = import.meta.env.VITE_VAPOR_ASSET_URL
? import.meta.env.VITE_VAPOR_ASSET_URL
: ''
Vue.mixin({

View File

@@ -1,7 +1,7 @@
import Vue from 'vue'
import PortalVue from 'portal-vue'
import Notifications from "vt-notifications"
import Notifications from 'vt-notifications'
Vue.use(PortalVue)
Vue.use(Notifications)