Package com.google.javascript.jscomp
Class SourceMapResolver
java.lang.Object
com.google.javascript.jscomp.SourceMapResolver
Utility class for resolving source maps and files referenced in source maps.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
addBase64PrefixToEncodedSourceMap
(String encoded) Returns the encoded source map with the base64 prefix attached.static @Nullable SourceFile
extractSourceMap
(SourceFile jsFile, String sourceMapURL, boolean parseInlineSourceMaps) For a given //# sourceMappingUrl, this locates the appropriate sourcemap on disk.
-
Method Details
-
extractSourceMap
public static @Nullable SourceFile extractSourceMap(SourceFile jsFile, String sourceMapURL, boolean parseInlineSourceMaps) For a given //# sourceMappingUrl, this locates the appropriate sourcemap on disk. This is use for sourcemap merging (--apply_input_source_maps) and for error resolution.- Parameters:
parseInlineSourceMaps
- Whether to parse Base64 encoded source maps.
-
addBase64PrefixToEncodedSourceMap
Returns the encoded source map with the base64 prefix attached. (i.e. prefix with "data:application/json;base64,")E.g. turns "eyJ2ZXJzaW9uI..." into "data:application/json;base64,eyJ2ZXJzaW9uI..."
-