Regression with CSS importing from MDX files #12635
Labels
- P3: minor bug
An edge case that only affects very specific usage (priority)
ecosystem: upstream
Upstream package has issue
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I use mdx files do import CSS based on dynamic components from CMS.
After migrating to v5, it stopped working properly in dev mode. It works only on first page load after build. CSS is missing after refresh and won't appear until rebuild.
I nailed it down to combination of tailwind applying styles, and scanning every astro file:
If i disable scanning of all astro files or disable
applyBaseStyles
it works.Also, i tried using new collections API, but the same thing is happening, so I just made example with minimum code
What's the expected result?
To apply styles imported from mdx on page refresh. Initially, page background is red from CSS code, and on refresh styles are not applied.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-jg5tdb
Participation
The text was updated successfully, but these errors were encountered: