From d3e789f8cc8597a47158589053886459a76ff337 Mon Sep 17 00:00:00 2001 From: Mehak Fatima Date: Sat, 15 Apr 2023 00:44:52 +0200 Subject: [PATCH] Refactor rehypePlugins configuration --- src/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 69ea7d7..0f9e864 100644 --- a/src/index.ts +++ b/src/index.ts @@ -212,9 +212,8 @@ function getCompilerOptionsAndContext( return { options: { providerImportSource: '@mdx-js/react', - rehypePlugins: [[plugin, context]], ...mdxCompileOptions, - + rehypePlugins: [...(mdxCompileOptions?.rehypePlugins || []), [plugin, context]], // preserve the JSX, we'll deal with it using babel jsx: true, },