Skip to content

fix(build): remove mdx from transpilation - #1860

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/build-error
Nov 8, 2025
Merged

fix(build): remove mdx from transpilation#1860
waleedlatif1 merged 1 commit into
stagingfrom
fix/build-error

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • remove mdx from transpilation bc it was accidentally added

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercelBot commented Nov 8, 2025

Copy link
Copy Markdown

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

1 Skipped Deployment
ProjectDeploymentPreviewCommentsUpdated (UTC)
docsSkippedSkippedNov 8, 2025 10:30pm

@waleedlatif1
waleedlatif1 merged commit b3490e9 into stagingNov 8, 2025
9 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/build-error branch November 8, 2025 22:33

@greptile-appsgreptile-appsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Overview

Greptile Summary

Removes 5 MDX-related packages (next-mdx-remote, gray-matter, rehype-autolink-headings, rehype-slug, remark-gfm) from the transpilePackages array in Next.js configuration.

Key Points:

  • These packages were accidentally added in PR #1698 (platform-v3)
  • The packages are actively used by the blog system in lib/blog/registry.ts and lib/blog/mdx.tsx
  • They import from /rsc subpath (React Server Components), which are already properly formatted for Next.js App Router
  • The transpilePackages option is only needed for packages that contain client-side code with incompatible module formats
  • This fix reduces unnecessary build-time transpilation overhead

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The change correctly removes packages that don't require transpilation. The MDX packages use React Server Components exports (/rsc) which are already compatible with Next.js App Router. The packages remain installed as dependencies and continue to be used by the blog system, so no functionality is affected. This simply optimizes the build configuration by removing unnecessary transpilation steps.
  • No files require special attention

Important Files Changed

File Analysis

FilenameScoreOverview
apps/sim/next.config.ts5/5Removed 5 MDX-related packages from transpilePackages array that were accidentally added and don't require transpilation

Sequence Diagram

sequenceDiagram
participant Dev as Developer
participant NC as next.config.ts
participant NB as Next.js Build
participant Blog as Blog System
Dev->>NC: Remove MDX packages from transpilePackages
Note over NC: transpilePackages array reduced<br/>from 10 to 5 entries
NB->>NC: Read build configuration
NC->>NB: Return transpilePackages list
Note over NB: Only transpiles:<br/>- prettier<br/>- @react-email/*<br/>- @t3-oss/*<br/>- @sim/db
Blog->>Blog: Import next-mdx-remote/rsc
Note over Blog: Uses native ESM/RSC exports<br/>No transpilation needed
NB->>Blog: Build blog pages
Note over NB,Blog: MDX packages used directly<br/>without transpilation
Loading

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1waleedlatif1 mentioned this pull request Nov 12, 2025
10 tasks
Sign up for freeto 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

@waleedlatif1