-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Async renderTransition() caused Build Failed #13908
Copy link
Copy link
Closed
Labels
- P2: has workaroundAn edge case that only affects very specific usage, but has a trivial workaround (priority)An edge case that only affects very specific usage, but has a trivial workaround (priority)feat: view transitionsRelated to the View Transitions feature (scope)Related to the View Transitions feature (scope)
Description
Astro Info
Astro v5.8.2
Node v23.11.0
System macOS (arm64)
Package Manager pnpm
Output static
Adapter none
Integrations unocss
@astrojs/mdx
@astrojs/partytown
@astrojs/sitemap
astro-robots-txt
astro-compress
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Related issue: withastro/compiler#1079
renderTransition() was set to async in Astro 5.9.1 , it causes build failed with the error: "await" can only be used inside an "async" function.
The transition:name isn't always static. After renderTransition() was set to async, we can no longer dynamically use post.id or post.date.title as transition:name values, which seems to be a limitation for the View Transition Name.
What's the expected result?
Build successfully
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-mxp8jccd?file=src%2Fpages%2Findex.astro
Participation
- I am willing to submit a pull request for this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
- P2: has workaroundAn edge case that only affects very specific usage, but has a trivial workaround (priority)An edge case that only affects very specific usage, but has a trivial workaround (priority)feat: view transitionsRelated to the View Transitions feature (scope)Related to the View Transitions feature (scope)
