appendSourceMap() — astro Function Reference
Architecture documentation for the appendSourceMap() function in index.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 3ca272ed_eb00_d38b_5345_6dd2041b384c["appendSourceMap()"] 97247306_c6df_a187_0755_eec66ac1134b["index.ts"] 3ca272ed_eb00_d38b_5345_6dd2041b384c -->|defined in| 97247306_c6df_a187_0755_eec66ac1134b 13d113dd_4a25_7029_c624_7d2dbaf4871c["astro()"] 13d113dd_4a25_7029_c624_7d2dbaf4871c -->|calls| 3ca272ed_eb00_d38b_5345_6dd2041b384c style 3ca272ed_eb00_d38b_5345_6dd2041b384c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/vite-plugin-astro/index.ts lines 323–330
function appendSourceMap(content: string, map?: string) {
if (!map) return content;
// The \n here is on purpose inside a template literal because otherwise, in the final built version of this file, the comment would
// start on its own line, and some tools will think it's actually the sourcemap of this file, not of generated code.
return `${content}${'\n//#'} sourceMappingURL=data:application/json;charset=utf-8;base64,${Buffer.from(
map,
).toString('base64')}`;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does appendSourceMap() do?
appendSourceMap() is a function in the astro codebase, defined in packages/astro/src/vite-plugin-astro/index.ts.
Where is appendSourceMap() defined?
appendSourceMap() is defined in packages/astro/src/vite-plugin-astro/index.ts at line 323.
What calls appendSourceMap()?
appendSourceMap() is called by 1 function(s): astro.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free