From 5412c4d6bef94d2614447454677c5bbdeddb64b4 Mon Sep 17 00:00:00 2001 From: Tadeu Zagallo Date: Thu, 12 Nov 2015 18:18:41 +0000 Subject: [PATCH] Fix the source maps merging In the current state, when the inputSourceMap has multiple sources, all the generated source map will point to the first file. Use the mapping's source instead. --- packages/babel-core/src/transformation/file/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-core/src/transformation/file/index.js b/packages/babel-core/src/transformation/file/index.js index 80c4365e32..aadd230773 100644 --- a/packages/babel-core/src/transformation/file/index.js +++ b/packages/babel-core/src/transformation/file/index.js @@ -362,7 +362,7 @@ export default class File extends Store { inputMapConsumer.eachMapping(function (mapping) { mergedGenerator.addMapping({ - source: inputMapConsumer.file, + source: mapping.source, original: { line: mapping.originalLine,