diff --git a/packages/integrations/mdx/src/index.ts b/packages/integrations/mdx/src/index.ts index ecd7b7b43..901ffb6bd 100644 --- a/packages/integrations/mdx/src/index.ts +++ b/packages/integrations/mdx/src/index.ts @@ -112,13 +112,13 @@ export default function mdx(partialMdxOptions: Partial = {}): AstroI } const { fileUrl, fileId } = getFileInfo(id, config); - if (!moduleExports.find(({n}) => n === 'url')) { + if (!moduleExports.find(({ n }) => n === 'url')) { code += `\nexport const url = ${JSON.stringify(fileUrl)};`; } - if (!moduleExports.find(({n}) => n === 'file')) { + if (!moduleExports.find(({ n }) => n === 'file')) { code += `\nexport const file = ${JSON.stringify(fileId)};`; } - if (!moduleExports.find(({n}) => n === 'Content')) { + if (!moduleExports.find(({ n }) => n === 'Content')) { // Make `Content` the default export so we can wrap `MDXContent` and pass in `Fragment` code = code.replace('export default MDXContent;', ''); code += `\nexport const Content = (props = {}) => MDXContent({