From c65e58023db4bf581ec5a6d28ffb53d0b291e4fe Mon Sep 17 00:00:00 2001 From: Krishna Ayyalasomayajula Date: Tue, 2 Jun 2026 11:24:57 -0500 Subject: [PATCH] config: use string-format plugin config for Turbopack compatibility --- next.config.ts | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/next.config.ts b/next.config.ts index f473b08..0bd1498 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,13 +1,5 @@ import type { NextConfig } from 'next' import createMDX from '@next/mdx' -import remarkSmartypants from 'remark-smartypants' -import remarkMath from 'remark-math' -import remarkGfm from 'remark-gfm' -import rehypeSlug from 'rehype-slug' -import rehypeExternalLinks from 'rehype-external-links' -import rehypeAutolinkHeadings from 'rehype-autolink-headings' -import rehypePrettyCode from 'rehype-pretty-code' -import rehypeKatex from 'rehype-katex' const nextConfig: NextConfig = { output: 'export', @@ -17,22 +9,20 @@ const nextConfig: NextConfig = { const withMDX = createMDX({ options: { - remarkPlugins: [remarkSmartypants, remarkMath, remarkGfm], + remarkPlugins: ['remark-smartypants', 'remark-math', 'remark-gfm'], rehypePlugins: [ - rehypeSlug, - [rehypeExternalLinks, { target: '_blank', rel: ['nofollow', 'noopener', 'noreferrer'] }], - rehypeAutolinkHeadings, - [rehypePrettyCode, { + 'rehype-slug', + ['rehype-external-links', { target: '_blank', rel: ['nofollow', 'noopener', 'noreferrer'] }], + 'rehype-autolink-headings', + ['rehype-pretty-code', { theme: { light: 'github-light', dark: 'github-dark-dimmed' }, keepBackground: false, lineNumbers: true, grid: true, }], - rehypeKatex, + 'rehype-katex', ], }, }) -const config = withMDX(nextConfig) -config.turbopack = {} -export default config +export default withMDX(nextConfig)