Minimal example:
I create a new Astro project, and create a collection test, with a single (non-empty) .md file.
The complete contents of my index.astro are
---
import { getCollection } from 'astro:content';
await getCollection('test');
---
When I start the server and load this page, I get no error message.
Then I add the MDX integration using npx astro add mdx, and make no other changes. When I start the server and load the page again, I get the error
The collection "test" does not exist or is empty. Ensure a collection directory with this name exists.
What might be going on here?
(This is a continuation of my previous thread; I’m making a new thread for this since I have isolated the issue more and it feels somewhat distinct.)