injectMetadataExports() — astro Function Reference
Architecture documentation for the injectMetadataExports() function in vite-plugin-mdx-postprocess.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 62a58fec_847a_8395_f00c_8a6e61053f8e["injectMetadataExports()"] 1d16286a_a608_ecf0_1939_33200eaee4a0["vite-plugin-mdx-postprocess.ts"] 62a58fec_847a_8395_f00c_8a6e61053f8e -->|defined in| 1d16286a_a608_ecf0_1939_33200eaee4a0 41ea6fc9_a90c_0a26_da48_58217361f433["vitePluginMdxPostprocess()"] 41ea6fc9_a90c_0a26_da48_58217361f433 -->|calls| 62a58fec_847a_8395_f00c_8a6e61053f8e style 62a58fec_847a_8395_f00c_8a6e61053f8e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/integrations/mdx/src/vite-plugin-mdx-postprocess.ts lines 58–70
function injectMetadataExports(
code: string,
exports: readonly ExportSpecifier[],
fileInfo: FileInfo,
) {
if (!exports.some(({ n }) => n === 'url')) {
code += `\nexport const url = ${JSON.stringify(fileInfo.fileUrl)};`;
}
if (!exports.some(({ n }) => n === 'file')) {
code += `\nexport const file = ${JSON.stringify(fileInfo.fileId)};`;
}
return code;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does injectMetadataExports() do?
injectMetadataExports() is a function in the astro codebase, defined in packages/integrations/mdx/src/vite-plugin-mdx-postprocess.ts.
Where is injectMetadataExports() defined?
injectMetadataExports() is defined in packages/integrations/mdx/src/vite-plugin-mdx-postprocess.ts at line 58.
What calls injectMetadataExports()?
injectMetadataExports() is called by 1 function(s): vitePluginMdxPostprocess.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free