loadConfigFromBundledFile() — astro Function Reference
Architecture documentation for the loadConfigFromBundledFile() function in load-config.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD d069a547_a7e0_34ce_5625_aa0d6d55e26b["loadConfigFromBundledFile()"] bed767c0_8e7f_8ca6_d8c0_dcaef61ca053["load-config.ts"] d069a547_a7e0_34ce_5625_aa0d6d55e26b -->|defined in| bed767c0_8e7f_8ca6_d8c0_dcaef61ca053 3c9d3cab_a608_a786_a49b_6b882154cef7["loadMarkdocConfig()"] 3c9d3cab_a608_a786_a49b_6b882154cef7 -->|calls| d069a547_a7e0_34ce_5625_aa0d6d55e26b style d069a547_a7e0_34ce_5625_aa0d6d55e26b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/integrations/markdoc/src/load-config.ts lines 105–118
async function loadConfigFromBundledFile(root: URL, code: string): Promise<AstroMarkdocConfig> {
// Write it to disk, load it with native Node ESM, then delete the file.
const tmpFileUrl = new URL(`markdoc.config.timestamp-${Date.now()}.mjs`, root);
fs.writeFileSync(tmpFileUrl, code);
try {
return (await import(tmpFileUrl.pathname)).default;
} finally {
try {
fs.unlinkSync(tmpFileUrl);
} catch {
// already removed if this function is called twice simultaneously
}
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does loadConfigFromBundledFile() do?
loadConfigFromBundledFile() is a function in the astro codebase, defined in packages/integrations/markdoc/src/load-config.ts.
Where is loadConfigFromBundledFile() defined?
loadConfigFromBundledFile() is defined in packages/integrations/markdoc/src/load-config.ts at line 105.
What calls loadConfigFromBundledFile()?
loadConfigFromBundledFile() is called by 1 function(s): loadMarkdocConfig.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free