Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/source_map/mod.js>SourceMapGenerator#applySourceMap

Port of mozilla / source-map to deno.
Latest
method SourceMapGenerator.prototype.applySourceMap
import { SourceMapGenerator } from "https://deno.land/x/source_map@0.8.0-beta.1/mod.js";

Applies the mappings of a sub-source-map for a specific source file to the source map being generated. Each mapping to the supplied source file is rewritten using the supplied source map. Note: The resolution for the resulting mappings is the minimium of this map and the supplied map.

Parameters

aSourceMapConsumer

The source map to be applied.

aSourceFile

Optional. The filename of the source file. If omitted, SourceMapConsumer's file property will be used.

aSourceMapPath

Optional. The dirname of the path to the source map to be applied. If relative, it is relative to the SourceMapConsumer. This parameter is needed when the two source maps aren't in the same directory, and the source map to be applied contains relative source paths. If so, those relative source paths need to be rewritten relative to the SourceMapGenerator.