Skip to content

Waiting for tag value causes imported module issue in Astro components #7292

@kireerik

Description

@kireerik

What version of astro are you using?

2.5.7

Are you using an SSR adapter? If so, which one?

no

What package manager are you using?

pnpm

What operating system are you using?

Windows

What browser are you using?

Chrome

Describe the Bug

In this case I get a syntax related exception for the Astro component related to the result (content) returned from my module.

example with issue:

---
import getContent from './module'
---

<Fragment set:html={await (async () =>
	<Fragment set:html={await getContent()}/>
)()}/>

workaround example:

---
import getContent from './module'
const content = await getContent()
---

<Fragment set:html={content}/>

Link to Minimal Reproducible Example

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions