We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d81557 commit 05f7239Copy full SHA for 05f7239
src/main.ts
@@ -41,14 +41,18 @@ import { isMobilePlatform } from "./utils/os";
41
/* Vue store */
42
const pinia = createPinia();
43
44
-if (__IS_ELECTRON__) {
45
- await import("./electron");
46
-} else if (isMobilePlatform()) {
47
- void import("./mobile");
+async function main(): Promise<void> {
+ if (__IS_ELECTRON__) {
+ await import("./electron");
+ } else if (isMobilePlatform()) {
48
+ await import("./mobile");
49
+ }
50
+
51
+ const app = createApp(App).use(IonicVue).use(pinia).use(router);
52
53
+ await router.isReady().then(() => {
54
+ app.mount("#app");
55
+ });
56
}
57
-const app = createApp(App).use(IonicVue).use(pinia).use(router);
-
-void router.isReady().then(() => {
- app.mount("#app");
-});
58
+void main();
0 commit comments