-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix(dev): fix MDX types when using pnpm #7491
Conversation
🦋 Changeset detectedLatest commit: 14192af The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
I'm seeing the same issue with |
Fixes #7448
This issue doesn't surface when
@types/mdx
is hoisted to the top-level innode_modules
, which is the behaviour of the official npm client, but pnpm is stricter about transitive dependencies and ensures that packages aren't hoisted to the top-level by default. This means that Remix consumers don't automatically get the global*.md
/*.mdx
types from@types/mdx
in their app code and only see our augmentedattributes
andfilename
exports. To fix this, we now explicitly import the global types as part of the augmentation.I've tested this change against a real app running both npm and pnpm to ensure this works across both, and I've confirmed that this change fixed the repro shared in the linked issue.