serializeSourceMap() — tailwindcss Function Reference
Architecture documentation for the serializeSourceMap() function in source-maps.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 66271ff8_a237_5788_6be6_f8b875b50399["serializeSourceMap()"] 7aee1750_2c9b_68e2_d651_f79f92781488["source-maps.ts"] 66271ff8_a237_5788_6be6_f8b875b50399 -->|defined in| 7aee1750_2c9b_68e2_d651_f79f92781488 e6a5f6a0_88ca_f7b2_ffff_670cf35fdba7["toSourceMap()"] e6a5f6a0_88ca_f7b2_ffff_670cf35fdba7 -->|calls| 66271ff8_a237_5788_6be6_f8b875b50399 5bcf4886_1230_a8ff_7302_a26cc5a9a525["get()"] 66271ff8_a237_5788_6be6_f8b875b50399 -->|calls| 5bcf4886_1230_a8ff_7302_a26cc5a9a525 style 66271ff8_a237_5788_6be6_f8b875b50399 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/@tailwindcss-node/src/source-maps.ts lines 12–43
function serializeSourceMap(map: DecodedSourceMap): string {
let generator = new SourceMapGenerator()
let id = 1
let sourceTable = new DefaultMap<
DecodedSource | null,
{
url: string
content: string
}
>((src) => {
return {
url: src?.url ?? `<unknown ${id++}>`,
content: src?.content ?? '<none>',
}
})
for (let mapping of map.mappings) {
let original = sourceTable.get(mapping.originalPosition?.source ?? null)
generator.addMapping({
generated: mapping.generatedPosition,
original: mapping.originalPosition,
source: original.url,
name: mapping.name,
})
generator.setSourceContent(original.url, original.content)
}
return generator.toString()
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does serializeSourceMap() do?
serializeSourceMap() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-node/src/source-maps.ts.
Where is serializeSourceMap() defined?
serializeSourceMap() is defined in packages/@tailwindcss-node/src/source-maps.ts at line 12.
What does serializeSourceMap() call?
serializeSourceMap() calls 1 function(s): get.
What calls serializeSourceMap()?
serializeSourceMap() is called by 1 function(s): toSourceMap.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free