fix: update MDX configuration for proper context creation

Co-Authored-By: G <butaeff@gmail.com>
This commit is contained in:
Devin AIandcato committed 2025-02-15 13:16:57 +00:00
1 parent 96484f8f8f
commit ef8a72cf36
2 files changed
+11 -13

No files matched your search

+6 -3
View File
@@ -1,7 +1,10 @@
'use client';
import React from 'react';
import { MDXProvider } from '@mdx-js/react';
import dynamic from 'next/dynamic';
const MDXProvider = dynamic(
() => import('@mdx-js/react').then(mod => mod.MDXProvider),
{ ssr: true }
);
const components = {
h1: (props: any) => (
+5 -10
View File
@@ -1,17 +1,12 @@
const withMDX = require('@next/mdx')({
extension: /\.mdx?$/,
options: {
remarkPlugins: [],
rehypePlugins: [],
},
});
/** @type {import('next').NextConfig} */
const nextConfig = withMDX({
const nextConfig = {
images: {
unoptimized: true,
},
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
});
experimental: {
mdxRs: true,
},
};
module.exports = nextConfig;