From 0ef60724454a5c725e944a4b32275cee61f252ba Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 3 Nov 2015 13:50:06 +0000 Subject: [PATCH] fix source map merging - closes #2522, fixes #2336 --- packages/babel-core/src/transformation/file/index.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/babel-core/src/transformation/file/index.js b/packages/babel-core/src/transformation/file/index.js index 5d5e18f29f..60fed23ff4 100644 --- a/packages/babel-core/src/transformation/file/index.js +++ b/packages/babel-core/src/transformation/file/index.js @@ -355,13 +355,9 @@ export default class File extends Store { if (inputMap) { let inputMapConsumer = new sourceMap.SourceMapConsumer(inputMap); let outputMapConsumer = new sourceMap.SourceMapConsumer(map); - let outputMapGenerator = sourceMap.SourceMapGenerator.fromSourceMap(outputMapConsumer); + var outputMapGenerator = sourceMap.SourceMapGenerator.fromSourceMap(outputMapConsumer); outputMapGenerator.applySourceMap(inputMapConsumer); - - let mergedMap = outputMapGenerator.toJSON(); - mergedMap.sources = inputMap.sources; - mergedMap.file = inputMap.file; - return mergedMap; + return outputMapGenerator.toJSON(); } else { return map; }