Skip to content

Commit

Permalink
andrey-skl#10 return back incoming filename to fix wrong sources disp…
Browse files Browse the repository at this point in the history
…layed
  • Loading branch information
andrey-skl committed Sep 5, 2015
1 parent 69fd023 commit d56bce7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/babel/sourcemap-reference.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ module.exports = function(source, inputSourceMap) {
if (annotateResult.map) {
var annotateMap = JSON.parse(annotateResult.map);
//Sources array should be filled somehow to work with source-map package
annotateMap.sources[0] = filename;

annotateMap.sources[0] = inputSourceMap.file;
var generator = SourceMapGenerator.fromSourceMap(new SourceMapConsumer(annotateMap));
generator.applySourceMap(new SourceMapConsumer(inputSourceMap));

Expand Down

0 comments on commit d56bce7

Please sign in to comment.