pub fn rewrite_sources(
sm: &SourceMap,
options: &RewriteOptions<'_>,
) -> SourceMapExpand description
Create a new SourceMap with rewritten source paths.
- If
strip_prefixescontains"~", auto-detects the common prefix viafind_common_prefix. - Strips matching prefixes from all source paths.
- If
!with_names, sets all name indices in mappings tou32::MAX. - If
!with_source_contents, sets allsourcesContententries toNone.
Preserves all mappings, ignore_list, extensions, debug_id, and scopes.