How do I compose multiple sourcemaps in node.js?

Viewed 13

I have a transpiler that takes input source and outputs TypeScript with a valid source map. The TypeScript compiler takes that TypeScript and outputs JavaScript with another source map. Is there a Node.js package or algorithm to compose the source maps so that I can create a new sourcemap that transforms positions in the final .js file back to the original source?

.civet  ->  .ts   ->   .js
       map1      map2

map3 = map2(map1) essentially
0 Answers
Related