brillout / brillout/vite-plugin-mdx
Dependency resolution doesn't work as expected when a project *also* uses MDX 2
- Dominant language
- TypeScript
- Stars
- 121
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
Hello! I've read the README, I know you're looking for a maintainer and also you don't want to hear about MDX 2 problems 🙂 *but* wanted to FYI in case you have any obvious answers, as I believe `imports.ts` is giving me issues in a project where MDX 2 is present (but this plugin should be ignoring it and using MDX 1)
The issue manifests when using Storybook with [storybook-builder-vite](https://github.com/eirslett/storybook-builder-vite/) (which uses this plugin and MDX 1). This plugin attempts to require the incorrect version of `mdx-js/mdx` from the project root `node_modules` rather than the `node_modules` right next to it.
More details here https://github.com/eirslett/storybook-builder-vite/issues/234 and test reproduction here https://github.com/bensmithett/test-case-mdx-import
Appreciate any help or pointing me in the right direction.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with imports.ts and the linked test reproduction, then compare its dependency lookup with the Storybook builder context described in issue 234. Reproduce the project containing both MDX versions and trace which package is resolved. Done means the plugin consistently uses its MDX 1 dependency without selecting the project-root MDX 2 package.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- storybook, typescript, vite
- 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