Skip to content

Commit

Permalink
Set sourceContent in source maps based on proper relative paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ivogabe committed Sep 22, 2016
1 parent b1315c5 commit aad16b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ export class Output {

if (!inputMap.sources || !inputMap.sourcesContent) continue;
for (let i = 0; i < inputMap.sources.length; i++) {
generator.setSourceContent(inputMap.sources[i], inputMap.sourcesContent[i]);
const absolute = path.resolve(sourceFile.gulp.base, inputMap.sources[i]);
const relative = path.relative(directory, absolute);
generator.setSourceContent(relative, inputMap.sourcesContent[i]);
}
}
return generator.toString();
Expand Down

0 comments on commit aad16b2

Please sign in to comment.