Skip to content

Comments

fix(ci): Remove tsconfig paths entry breaking Bun scripts#16476

Open
jaffrepaul wants to merge 3 commits intomasterfrom
fix/bun-tsconfig-paths-resolution
Open

fix(ci): Remove tsconfig paths entry breaking Bun scripts#16476
jaffrepaul wants to merge 3 commits intomasterfrom
fix/bun-tsconfig-paths-resolution

Conversation

@jaffrepaul
Copy link
Contributor

@jaffrepaul jaffrepaul commented Feb 20, 2026

Fix the Algolia indexing failure introduced in #16419 (yarn to pnpm migration).

The problem:
PR #16419 added a tsconfig paths entry redirecting remark-mdx-images to a .d.ts file. This worked for TypeScript but broke Bun, which tried to execute the .d.ts as a runtime module, causing SyntaxError: Missing 'default' export.

The fix:
Use pnpm patch to fix the actual type error in remark-mdx-images. The package is missing attributes: [] on an ImportDeclaration object, which newer estree types require.

Changes:

  • Add patches/remark-mdx-images@3.0.0.patch with the one-line fix
  • Remove the tsconfig paths workaround
  • Remove the now-unnecessary src/@types/remark-mdx-images.d.ts

Verified locally:

  • pnpm lint:ts
  • pnpm test ✅ (124 tests)
  • All Bun scripts load without module resolution errors ✅

The paths mapping for remark-mdx-images was redirecting Bun's runtime
module resolution to a .d.ts file, causing "Missing 'default' export"
errors in CI workflows (algolia-index, lint-404s, etc.).

The ambient module declaration in src/@types/remark-mdx-images.d.ts
still provides TypeScript types via typeRoots without the paths entry.

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Feb 20, 2026 2:17am
sentry-docs Ignored Ignored Preview Feb 20, 2026 2:17am

Request Review

Add missing `attributes: []` property to ImportDeclaration object
in remark-mdx-images. The estree types require this property but the
package doesn't provide it, causing TypeScript errors.

This patch fixes the root cause instead of working around it with
tsconfig paths redirects that broke Bun's runtime resolution.

Also removes the now-unnecessary type declaration file.

Co-Authored-By: Claude <noreply@anthropic.com>
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

Successfully merging this pull request may close these issues.

1 participant