summaryrefslogtreecommitdiff
path: root/packages/integrations/mdx/src/index.ts
diff options
context:
space:
mode:
authorGravatar Emanuele Stoppa <my.burning@gmail.com> 2023-05-24 10:20:06 +0100
committerGravatar GitHub <noreply@github.com> 2023-05-24 10:20:06 +0100
commit7851f9258fae2f54795470253df9ce4bcd5f9cb0 (patch)
tree625dd414b216eabc14e3ab36c81783bdc693fb9c /packages/integrations/mdx/src/index.ts
parent27c6e01826a6da525f1f811d97784accd1ebbd96 (diff)
downloadastro-7851f9258fae2f54795470253df9ce4bcd5f9cb0.tar.gz
astro-7851f9258fae2f54795470253df9ce4bcd5f9cb0.tar.zst
astro-7851f9258fae2f54795470253df9ce4bcd5f9cb0.zip
fix: detect `mdx` files using full extension (#7192)
Diffstat (limited to 'packages/integrations/mdx/src/index.ts')
-rw-r--r--packages/integrations/mdx/src/index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/integrations/mdx/src/index.ts b/packages/integrations/mdx/src/index.ts
index 3e1f84c0a..0d1ff9d13 100644
--- a/packages/integrations/mdx/src/index.ts
+++ b/packages/integrations/mdx/src/index.ts
@@ -94,7 +94,7 @@ export default function mdx(partialMdxOptions: Partial<MdxOptions> = {}): AstroI
// Override transform to alter code before MDX compilation
// ex. inject layouts
async transform(_, id) {
- if (!id.endsWith('mdx')) return;
+ if (!id.endsWith('.mdx')) return;
// Read code from file manually to prevent Vite from parsing `import.meta.env` expressions
const { fileId } = getFileInfo(id, config);