@astrojs/markdoc v0.2.2: Markdoc tag rendering Astro component breaks when component uses getEntryBySlug() #7170
Labels
- P4: important
Violate documented behavior or significantly impacts performance (priority)
pkg: markdoc
Related to the `@astrojs/markdoc` package (scope)
What version of
astro
are you using?2.5.3
Are you using an SSR adapter? If so, which one?
Vercel
What package manager are you using?
pnpm
What operating system are you using?
Mac
What browser are you using?
Chrome, Safari
Describe the Bug
This is a very particular bug that showed up with @astrojs/markdoc v0.2.2 , when all of the following are true:
markdoc.config.mjs
imports an Astro component (for the purpose of defining a tag, although no tag actually needs to be defined—or used in any .mdoc file)getEntryBySlug()
to access data from another content collection (the newgetEntry()
also produces the error)The error looks like:
Pages render as expected after downgrading to v0.2.1, or when any of the other items above are false!
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-pq3pgo?file=markdoc.config.mjs
Participation
The text was updated successfully, but these errors were encountered: