Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
fix: remove topLevelAwait usage
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Dec 13, 2021
1 parent 8f56f56 commit 6653da6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ setupStore(app);
// 挂载路由
setupRouter(app);
// 路由准备就绪后挂载APP实例
await router.isReady();
app.mount('#app');
router.isReady().then(() => app.mount('#app'));
10 changes: 10 additions & 0 deletions types/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/// <reference types="vite/client" />

interface ImportMetaEnv {
readonly VITE_APP_TITLE: string;
// 更多环境变量...
}

interface ImportMeta {
readonly env: ImportMetaEnv;
}

0 comments on commit 6653da6

Please sign in to comment.