File tree 3 files changed +8
-2
lines changed
3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @astrojs/mdx ' : patch
3
+ ' astro ' : patch
4
+ ---
5
+
6
+ Detect ` mdx ` files using their full extension
Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ async function render({
306
306
307
307
let props = baseProps ;
308
308
// Auto-apply MDX components export
309
- if ( id . endsWith ( 'mdx' ) ) {
309
+ if ( id . endsWith ( '. mdx' ) ) {
310
310
props = {
311
311
components : mod . components ?? { } ,
312
312
...baseProps ,
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ export default function mdx(partialMdxOptions: Partial<MdxOptions> = {}): AstroI
95
95
// Override transform to alter code before MDX compilation
96
96
// ex. inject layouts
97
97
async transform ( _ , id ) {
98
- if ( ! id . endsWith ( 'mdx' ) ) return ;
98
+ if ( ! id . endsWith ( '. mdx' ) ) return ;
99
99
100
100
// Read code from file manually to prevent Vite from parsing `import.meta.env` expressions
101
101
const { fileId } = getFileInfo ( id , config ) ;
You can’t perform that action at this time.
0 commit comments