-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
MDX Content component imported via Astro.glob initially renders child components unstyled #12004
Comments
Astro.glob has been deprecated and will be removed in a future version of Astro. I suggest starting to use Content Collections instead: https://docs.astro.build/en/tutorials/add-content-collections/ |
Thanks, I wasn't aware of Astro.glob being deprecated. Will the And thanks for the tip about Content Collections, I'll take a look. |
The issue seems to be that with When the So I think this is more of a limitation of the current rendering. You can workaround this with |
@bluwy Is this something we're ever likely to be able to fix, or can this be closed? |
Yeah I think we can close this. I don't think there's an easy fix in the long run anyways, and using content collections or content layer would be better (for other reasons too) for now. |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When using
Astro.glob()
to import mdx file(s), the<Content>
component fails to render styles of any children components on initial page load of dev server. If the page is refreshed or a browser tab was already open to the dev server url, the child components are rendered with styles correctly.Build command renders components correctly.
What's the expected result?
Content component should display correctly on initial page load of dev server
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-1acyzy?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: