diff options
author | 2023-05-24 10:20:06 +0100 | |
---|---|---|
committer | 2023-05-24 10:20:06 +0100 | |
commit | 7851f9258fae2f54795470253df9ce4bcd5f9cb0 (patch) | |
tree | 625dd414b216eabc14e3ab36c81783bdc693fb9c /packages/integrations/mdx/src/index.ts | |
parent | 27c6e01826a6da525f1f811d97784accd1ebbd96 (diff) | |
download | astro-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.ts | 2 |
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); |