Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue appEntrypoint cannot be asynchronous #9557

Closed
1 task done
michaelhthomas opened this issue Jan 1, 2024 · 0 comments · Fixed by #9558
Closed
1 task done

Vue appEntrypoint cannot be asynchronous #9557

michaelhthomas opened this issue Jan 1, 2024 · 0 comments · Fixed by #9558
Labels
needs triage Issue needs to be triaged

Comments

@michaelhthomas
Copy link
Contributor

michaelhthomas commented Jan 1, 2024

Astro Info

Astro                    v4.0.8
Node                     v20.10.0
System                   macOS (arm64)
Package Manager          pnpm
Output                   static
Adapter                  none
Integrations             @astrojs/vue
                         astro-global

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Asynchronous setup scripts in appEntrypoint do not work as expected. It seems this is intended to work, but due to the Vite virtual module being synchronous, the setup script is not properly awaited. This bug appears to have been introduced in #9362.

What's the expected result?

Asynchronous setup scripts are executed before the Vue application is mounted, enabling async code to be run in the appEntrypoint file.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-wwumrz?file=src%2Fvue-entrypoint.ts

Participation

  • I am willing to submit a pull request for this issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant