unplugin / unplugin/unplugin-auto-import
Doesn't work with Astro MDX
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.8k
- Forks
- 217
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
This package doesn't work with Astro+MDX integration.
I defined the proper component path and exports in the config. When I Use the auto imports in .astro files or .svelte files, it works well. But in .mdx file, it completely fails.
In reproduction, if you go to /some-page route, it works there. But on / page which is a .mdx file, it doesn't
Reproduction
System Info
System:
OS: macOS 13.0.1
CPU: (10) arm64 Apple M1 Pro
Memory: 229.92 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.17.1 - ~/Library/pnpm/node
Yarn: 1.22.19 - ~/Library/pnpm/yarn
npm: 8.15.0 - ~/Library/pnpm/npm
Browsers:
Brave Browser: 107.1.45.118
Chrome: 107.0.5304.110
Edge: 107.0.1418.42
Firefox: 104.0.2
Safari: 16.1
Used Package Manager
pnpm
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- The provided reproduction is a minimal reproducible of the bug.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the StackBlitz reproduction, especially package.json, astro.config.mjs, src/pages/index.mdx, and src/pages/some-page.astro, and compare auto-import behavior on the MDX and Astro routes. Done means the configured auto imports work in the MDX page as they already do in the Astro and Svelte files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100