Function collapse_sourcemap_chain

Source
pub fn collapse_sourcemap_chain(
    chain: Vec<SourceMap>,
    opts: CollapseSourcemapOptions,
) -> SourceMap
Expand description

collapse source map chain to a single source.

transformation: a -> b -> c -> d, source content is a and dest content is d. corresponding input source map: [map_a, map_b, map_c, map_d].

now we have d and map_d, we want to get a and map_a, we should tracing from map_d to map_a.