Skip to content

Commit 70028af

Browse files
committed
use sourceRoot from map to find sources #1
1 parent 2941c40 commit 70028af

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ module.exports = function(input, inputMap) {
5454
}
5555
function processMap(map, context, callback) {
5656
if(!map.sourcesContent || map.sourcesContent.length < map.sources.length) {
57+
var sourcePrefix = map.sourceRoot ? map.sourceRoot + "/" : "";
5758
var missingSources = map.sourcesContent ? map.sources.slice(map.sourcesContent.length) : map.sources;
5859
async.map(missingSources, function(source, callback) {
59-
resolve(context, loaderUtils.urlToRequest(source), function(err, result) {
60+
resolve(context, loaderUtils.urlToRequest(sourcePrefix + source), function(err, result) {
6061
if(err) {
6162
emitWarning("Cannot find source file '" + source + "': " + err);
6263
return callback(null, null);

0 commit comments

Comments
 (0)