code: function preprocessSourceMap(sourceMap) {
        if (typeof sourceMap === 'string') {
          sourceMap = JSON.parse(sourceMap);
        }
        if (sourceMap && Array.isArray(sourceMap.sources)) {
          sourceMap.sources = sourceMap.sources.map(sourceUrl =>
            urlTools.resolveUrl(assetGraph.root, sourceUrl.replace(/^\//, ''))
          );
        }
        return sourceMap;
      }
docs: Parse a source map (if given as a string) and absolutify the urls in the sources array: