fix: top level await
This commit is contained in:
parent
5519769c73
commit
24278eb9b6
10
src/main.ts
10
src/main.ts
@ -15,7 +15,11 @@ const getRootElement = (id: string): HTMLElement => {
|
|||||||
return element
|
return element
|
||||||
}
|
}
|
||||||
|
|
||||||
const vdom = await init()
|
const startApp = async () => {
|
||||||
const rootElement = getRootElement('root')
|
const vdom = await init()
|
||||||
|
const rootElement = getRootElement('root')
|
||||||
|
|
||||||
ReactDOM.createRoot(rootElement).render(vdom)
|
ReactDOM.createRoot(rootElement).render(vdom)
|
||||||
|
}
|
||||||
|
|
||||||
|
startApp()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user