Skip to content

Commit a86df9f

Browse files
committed
remove sourceRoot from map
1 parent 91602f8 commit a86df9f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ module.exports = function(input, inputMap) {
5555
function processMap(map, context, callback) {
5656
if(!map.sourcesContent || map.sourcesContent.length < map.sources.length) {
5757
var sourcePrefix = map.sourceRoot ? map.sourceRoot + "/" : "";
58+
map.sources = map.sources.map(function(s) { return sourcePrefix + s; });
59+
map.sourceRoot = undefined;
5860
var missingSources = map.sourcesContent ? map.sources.slice(map.sourcesContent.length) : map.sources;
5961
async.map(missingSources, function(source, callback) {
60-
resolve(context, loaderUtils.urlToRequest(sourcePrefix + source), function(err, result) {
62+
resolve(context, loaderUtils.urlToRequest(source), function(err, result) {
6163
if(err) {
6264
emitWarning("Cannot find source file '" + source + "': " + err);
6365
return callback(null, null);

0 commit comments

Comments
 (0)