From 4b066f7f1b7963dec867f9c85d04504190b2f457 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Fri, 13 Mar 2015 13:12:38 +1100 Subject: [PATCH] add input sourcemap false option #827 --- src/babel/transformation/file.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/babel/transformation/file.js b/src/babel/transformation/file.js index 900ffc3106..5054d7bdcd 100644 --- a/src/babel/transformation/file.js +++ b/src/babel/transformation/file.js @@ -280,10 +280,12 @@ export default class File { parseInputSourceMap(code: string) { var opts = this.opts; - var inputMap = convertSourceMap.fromSource(code); - if (inputMap) { - opts.inputSourceMap = inputMap.toObject(); - code = convertSourceMap.removeComments(code); + if (opts.inputSourceMap === false) { + var inputMap = convertSourceMap.fromSource(code); + if (inputMap) { + opts.inputSourceMap = inputMap.toObject(); + code = convertSourceMap.removeComments(code); + } } return code;