Skip to content
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

Console warning about MDX initialization sequence when used with Starlight #46

Open
evadecker opened this issue Jul 31, 2024 · 0 comments

Comments

@evadecker
Copy link

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!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant