The easy but lossy way is to ignore the intermediate steps in the process for the purposes of debugging, the source location information from the translation is either ignored (the intermediate translation is considered the “Original Source”) or the source location information is carried through (the intermediate translation hidden). -- Source Map Revision 3 Proposal
multi-stage-sourcemap does that!
C.js -> ... -> A.js
Code:
var transfer = require("multi-stage-sourcemap").transfer;var cToAMap = transfer({fromSourceMap: cMap, toSourceMap: bMap});
Usage
transfer
Return the re-mapped rawSourceMap string.
The only argument is an object with the following properties:
fromSourceMap : Object - rawSourceMap or String - JSON.stringify(rawSourceMap)
toSourceMap : Object - rawSourceMap or String - JSON.stringify(rawSourceMap)