🐛 BUG: `astro dev` Components used in MDX-Layout do not update on save
What version of astro are you using?
1.0.0-rc.6
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
yarn
What operating system are you using?
Mac
Describe the Bug
When using the MDX-Integration and import an Astro-Component in the MDX-Layout file, the values in the Component-Script of that Component do not get updated on save while running astro dev
Example: const test was changed from "a" to "b", but it's still outputting "a"

Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-1trqzs?file=README.md&on=stackblitz
Participation
- [ ] I am willing to submit a pull request for this issue.
I investigated this a little bit and am totally stumped. There might be a race condition in the module graph not populating importers properly or we might not be crawling all the way up the importer graph to invalidate the correct modules.
@natemoo-re you've probably already found out yourself, but this is not limited to the component-script, but affects the whole component.
I'm experiencing this too, I think, using Astro 1.0.0.
If I change my .mdx files back to .md everything works. Meaning, my changes are reflected in the browser upon save.
Otherwise, if I really want to use .mdx files, I'd have to perform some tedious painful drill of deleting or commenting out the component, make my changes, then comment back in the component. Not fun.
@ChristianK43 @djmtype Looks like this may be resolved in the latest version of Astro (1.0.9) and MDX (0.10.1)! I have a working demo over here with that Dummy component you provided. Let me know if this works as expected for you when editing on the dev server.
https://stackblitz.com/edit/github-u9y6mb?file=src/components/Title.astro
@ChristianK43 @djmtype Looks like this may be resolved in the latest version of Astro (
1.0.9) and MDX (0.10.1)! I have a working demo over here with thatDummycomponent you provided. Let me know if this works as expected for you when editing on the dev server.https://stackblitz.com/edit/github-u9y6mb?file=src/components/Title.astro
Just spent a frustrating hour trying to figure out why my pages weren't hotreloading, finally find this.
Works fine on the following versions, thanks!!
"@astrojs/mdx": "^0.10.2",
"astro": "^1.1.1",
@Bobakanoosh glad to hear it! I'll close this thread first thing tomorrow if I don't see any follow-ups.
Closing! I'll reopen if anything is discovered. Thanks y'all 🙏