From 90fb775509a356915ed8aed89d0f11964421a8aa Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Thu, 30 Nov 2023 09:51:06 +0700 Subject: [PATCH] fix: build error top level await --- Services/client/src/main.ts | 38 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Services/client/src/main.ts b/Services/client/src/main.ts index 4a436d5..a7cb552 100644 --- a/Services/client/src/main.ts +++ b/Services/client/src/main.ts @@ -10,25 +10,25 @@ import quasarUserOptions from './quasar-user-options' import 'quasar/src/css/index.sass' import { login } from './services/KeyCloakService' -await login() +login().then(async () => { + const app = createApp(App) + const pinia = createPinia() -const app = createApp(App) -const pinia = createPinia() + app.use((await import('./router')).default) + app.use(pinia) + app.use(Quasar, { + ...quasarUserOptions, + plugins: { + Dialog, + Loading, + }, + lang: th, + }) -app.use((await import('./router')).default) -app.use(pinia) -app.use(Quasar, { - ...quasarUserOptions, - plugins: { - Dialog, - Loading, - }, - lang: th, + app.component( + 'full-loader', + defineAsyncComponent(() => import('@/components/FullLoader.vue')), + ) + + app.mount('#app') }) - -app.component( - 'full-loader', - defineAsyncComponent(() => import('@/components/FullLoader.vue')), -) - -app.mount('#app')