UNPKG

330 BJavaScriptView Raw
1var path = require('path');
2var url = require('url');
3
4function rebaseRemoteMap(sourceMap, sourceUri) {
5 var sourceDirectory = path.dirname(sourceUri);
6
7 sourceMap.sources = sourceMap.sources.map(function(source) {
8 return url.resolve(sourceDirectory, source);
9 });
10
11 return sourceMap;
12}
13
14module.exports = rebaseRemoteMap;