What's happening?
When using AutoImport and Starlight, AutoImport must be placed after the Starlight integration in order to function properly. However, the package throws a warning in the console:
[auto-import] ⚠️ @astrojs/mdx initialized BEFORE astro-auto-import.
Auto imports in .mdx files won’t work!
Move the MDX integration after auto-import in your integrations array in astro.config.
Starlight initializes MDX automatically, and auto-importing seems to work fine when placed afterwards.
Minimal reproduction
https://stackblitz.com/edit/github-jqmc1e?file=astro.config.mjs
(Thanks Chris!)