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
In a certain circumstance when using a component in an MDX file, the css and script links are being injected into the body of the final page at the point where the component is, instead of the head.
All pages in the example are basically the same, pulling in a simple component which takes an optional title. If the title is passed in an MDX file, the css & scripts get injected where the component starts. If the title is not given or the file is an .astro file, it gets injected into the head where it should be.
After going through all the releases from a time when it worked as expected up to recent, it came down to an update in version 2.1.6 (possibly 7daef9a29?)
Unfortunately my JS skills are extremely limited so cannot dig further!
What version of
astro
are you using?2.1.7
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
pnpm
What operating system are you using?
Windows
What browser are you using?
Chrome, Firefox
Describe the Bug
In a certain circumstance when using a component in an MDX file, the css and script links are being injected into the body of the final page at the point where the component is, instead of the head.
All pages in the example are basically the same, pulling in a simple component which takes an optional title. If the title is passed in an MDX file, the css & scripts get injected where the component starts. If the title is not given or the file is an
.astro
file, it gets injected into the head where it should be.After going through all the releases from a time when it worked as expected up to recent, it came down to an update in version 2.1.6 (possibly 7daef9a29?)
Unfortunately my JS skills are extremely limited so cannot dig further!
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-hu9zun?file=src/pages/index.mdx
Participation
The text was updated successfully, but these errors were encountered: