fix(website): migrate blog from next-mdx-remote to @next/mdx
next-mdx-remote evaluates MDX at runtime with a different React version than Next.js 16's internal canary, causing build failures. Switch to @next/mdx which compiles MDX through Next.js's own bundler pipeline. - Replace next-mdx-remote with @next/mdx, @mdx-js/mdx, @mdx-js/loader - Use dynamic imports for blog MDX files instead of MDXRemote - Add remark-frontmatter so compiler skips YAML frontmatter blocks - Gate cache/CSP headers to production only (immutable dev chunks were poisoning browser cache) Made-with: Cursor
This commit is contained in:
6
apps/website/mdx-components.tsx
Normal file
6
apps/website/mdx-components.tsx
Normal file
@@ -0,0 +1,6 @@
|
||||
import type { MDXComponents } from "mdx/types";
|
||||
import { mdxComponents } from "@/components/blogComponents";
|
||||
|
||||
export function useMDXComponents(components: MDXComponents): MDXComponents {
|
||||
return { ...mdxComponents, ...components };
|
||||
}
|
||||
Reference in New Issue
Block a user