-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Duplicate css and js bundle tags when mdx is rendered in sub-layout #5715
Comments
Facing same issue, I am using astro 1.9. |
Also seeing this issue on my website which uses Astro 1.9.1 |
Another one here - not just in dev but in the built static site too. Makes editing CSS in devtools a little annoying! Just a thank you in advance, at least I hope this is the root of the issue I'm having :) |
Sorry about this one. There's a couple of CSS ordering / duplication bugs floating around and I'm tackling all of those now. |
I think this is likely fixed by #6034 but keeping open to test. |
No more duplicates (🎉) but it injects link+style in body now. Is that intentional? |
What version of
astro
are you using?1.8.0
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Linux
Describe the Bug
When MDX imports a component and is rendered using a sub-layout/nested layout (ex.
BlogPostLayout
which again usesBaseLayout
), link tags for bundled stylesheets and bundled JS module may be injected twice inastro build
. The duplicates are placed in the body before the component.Run
astro build
in repro and inspect generated HTML.Repro includes three layouts:
Pages:
index*.astro
imports<Content />
from MDX.render()
with content collections behaves the same.test*.mdx
uses layout-frontmatter. This only fails using layout Three for some unknown reason.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-ske6w4
Participation
The text was updated successfully, but these errors were encountered: