Expand description
Utility functions for source map path resolution, validation, rewriting, and encoding.
Structs§
- Rewrite
Options - Options for rewriting source map paths and content.
Enums§
- Decoded
Map - A unified type that can hold any decoded source map variant.
Functions§
- find_
common_ prefix - Find the longest common directory prefix among absolute file paths.
- is_
sourcemap - Quick check if a JSON string looks like a valid source map.
- make_
relative_ path - Compute the relative path from
basetotarget. - resolve_
source_ map_ path - Resolve a source map reference against a filesystem path.
- resolve_
source_ map_ url - Resolve a relative
sourceMappingURLagainst the minified file’s URL. - rewrite_
sources - Create a new
SourceMapwith rewritten source paths. - to_
data_ url - Convert a source map JSON string to a
data:URL.