From c4921afedfb749980c9fea313b706308148a714f Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 17 Apr 2024 12:02:36 +0200 Subject: [PATCH 1/2] Add include mdx to vite react plugin Signed-off-by: Dan --- docs/docs/getting-started.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/getting-started.mdx b/docs/docs/getting-started.mdx index 74bc9c310..d5fb5e693 100644 --- a/docs/docs/getting-started.mdx +++ b/docs/docs/getting-started.mdx @@ -352,7 +352,7 @@ To use more modern JavaScript features than what your users support, const viteConfig = defineConfig({ plugins: [ {enforce: 'pre', ...mdx(/* jsxImportSource: …, otherOptions… */)}, - react() + react({ include: /\.(mdx|js|jsx|ts|tsx)$/ }) ] }) // … From 756374de5bdffe1bf360cb28660b0bab31a7cbb5 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 17 Apr 2024 13:51:37 +0200 Subject: [PATCH 2/2] Update docs/docs/getting-started.mdx Co-authored-by: Titus Signed-off-by: Dan --- docs/docs/getting-started.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/getting-started.mdx b/docs/docs/getting-started.mdx index d5fb5e693..56790685f 100644 --- a/docs/docs/getting-started.mdx +++ b/docs/docs/getting-started.mdx @@ -352,7 +352,7 @@ To use more modern JavaScript features than what your users support, const viteConfig = defineConfig({ plugins: [ {enforce: 'pre', ...mdx(/* jsxImportSource: …, otherOptions… */)}, - react({ include: /\.(mdx|js|jsx|ts|tsx)$/ }) + react({include: /\.(jsx|js|mdx|md|tsx|ts)$/}) ] }) // …