Skip to main content

Crate rolldown_sourcemap

Crate rolldown_sourcemap 

Source

Structs§

JSONSourceMap
See https://tc39.es/ecma426/#sec-source-map-format.
OwnedSourceMap
An owned, lifetime-free source map.
SourceJoiner
SourceMapBuilder
Helper to build a SourceMap.
SourceMapSource
SourcemapVisualizer
The SourcemapVisualizer is a helper for sourcemap testing. It print the mapping of original content and final content tokens.

Traits§

Source

Functions§

adjust_sourcemap_dst_lines
Strips the first lines destination lines from the sourcemap, decrementing all remaining destination line numbers accordingly. Used to re-anchor a sourcemap after removing a prefix (e.g. a shebang line) from the generated code.
collapse_sourcemaps
collapse_sourcemaps_traced
Like collapse_sourcemaps, but keeps only the sources and names that a traced token references, as Rollup’s traceMappings() does. So a map with no mappings (e.g. a transform’s { mappings: '' }) cuts out the code before it. A chain of one map is traced too, but it keeps its other fields, such as sourceRoot, as getCombinedSourcemap did before.
empty_sourcemap
Builds an empty sourcemap with no tokens, sources, names, or contents.

Type Aliases§

SourceMap
Rolldown always stores and produces owned sourcemaps, so we alias the lifetime-parameterized oxc_sourcemap::SourceMap to its 'static form.