Skip to content

Conversation

@waleedlatif1
Copy link
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
Copy link

vercel bot commented Nov 8, 2025

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

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Nov 8, 2025 10:30pm

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

@greptile-apps greptile-apps bot left a comment

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

Filename Score Overview
apps/sim/next.config.ts 5/5 Removed 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

@waleedlatif1 waleedlatif1 mentioned this pull request Nov 12, 2025
10 tasks
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.

2 participants