From d08905845a8a6dc59d5d7b7cc1de8ef1367dc150 Mon Sep 17 00:00:00 2001 From: Alessia Bellisario Date: Tue, 12 Sep 2023 22:56:23 -0400 Subject: [PATCH] add missing mdx-components.tsx --- mdx-components.tsx | 15 +++++++++++++++ next.config.mjs | 1 + 2 files changed, 16 insertions(+) create mode 100644 mdx-components.tsx diff --git a/mdx-components.tsx b/mdx-components.tsx new file mode 100644 index 000000000..bdc4216ca --- /dev/null +++ b/mdx-components.tsx @@ -0,0 +1,15 @@ +import type { MDXComponents } from 'mdx/types' + +// This file allows you to provide custom React components +// to be used in MDX files. You can import and use any +// React component you want, including components from +// other libraries. + +// This file is required to use MDX in `app` directory. +export function useMDXComponents(components: MDXComponents): MDXComponents { + return { + // Allows customizing built-in components, e.g. to add styling. + // h1: ({ children }) =>

{children}

, + ...components, + } +} \ No newline at end of file diff --git a/next.config.mjs b/next.config.mjs index c1babbc24..8e7e94dc9 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -24,6 +24,7 @@ const nextConfig = { swcMinify: true, experimental: { scrollRestoration: true, + mdxRs: true, }, webpack: (config) => { config.experiments = {