0.0.2 • Published 6 years ago
@v2awesome/source-map-composer v0.0.2
source-map-composer
merge final sourceMap with intermediate sourceMap, generate new one connect target with origin.
how to use
npm install @v2awesome/source-map-composer
import {composeSourceMap} from 'source-map-composer'
/**
* composeSourcemap
* compose sourcemap into one, the sourcemap should be desc sorted passed into function
*
* @param {...string[]} paths desc sorted sorucemap'path, last path should be the origin sourcemap, and involed first
*
* @returns {(Promise<void | string>)} composed sourcemap
*/
composeSourceMap(paths)
why this packages?
In my case: typescript
(origin) -> es6module
(intermediate) --rollup--> target (umd). This flow will produce two sourceMap, ts_es6_sourceMap
, and es6_target_sourceMap
, target's sourceMap will no longer track to the orign source.