Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf-h5
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jianan
yd-csf-h5
Commits
3a7e11b7
Commit
3a7e11b7
authored
Oct 23, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(build): 顶层 await 包进 bootstrap,兼容 es2020 构建目标
parent
66c94542
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
src/main.ts
+8
-4
No files found.
src/main.ts
View file @
3a7e11b7
...
@@ -11,7 +11,11 @@ app.use(createPinia())
...
@@ -11,7 +11,11 @@ app.use(createPinia())
app
.
use
(
router
)
app
.
use
(
router
)
app
.
use
(
i18n
)
app
.
use
(
i18n
)
// 挂载前从内存登录态同步用户信息,供 LoginBadge 等组件渲染
// 挂载前从内存登录态同步用户信息,供 LoginBadge 等组件渲染。
await
useAuthStore
().
init
()
// 包进普通 async 函数,避免使用需要 es2022 的顶层 await。
async
function
bootstrap
():
Promise
<
void
>
{
await
useAuthStore
().
init
()
app
.
mount
(
'#app'
)
}
app
.
mount
(
'#app'
)
void
bootstrap
()
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment