You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// main.ts(asyncfunctionload(){console.log("[1] run main.ts");constasyncAction=awaitimport("./asyncAction");asyncAction.default();awaitimport("./loadApp");})();// asyncAction.tsconsole.log("[2] async action logged");exportdefault()=>{console.log("[3] run async action");};// loadApp.jsimport{createApp}from"vue";import"./style.css";importAppfrom"./App.vue";console.log("[4] run loadApp");createApp(App).mount("#app");
Issue Details:
When running the code in UMD format, the execution order of the logs is different from the expected order. The logs are displayed as "[1] => [2] => [4] => [3]". However, under dev mode and ES format of production mode, the execution order is correct.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
Code Snippet:
Expected Execution Order: [1] => [2] => [3] => [4]
Issue Details:
When running the code in UMD format, the execution order of the logs is different from the expected order. The logs are displayed as "[1] => [2] => [4] => [3]". However, under dev mode and ES format of production mode, the execution order is correct.
Reproduction
https://codesandbox.io/p/devbox/async-await-5nxz53
Steps to reproduce
format
toes
orumd
invite.config.ts
npm run build && npm run preview
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: