From a0e178f128755d2f75feadceea876b0afdff6553 Mon Sep 17 00:00:00 2001 From: Nathan Agrin Date: Fri, 5 Jan 2018 19:46:22 -0800 Subject: [PATCH] Fix sourceMap parsing Found here https://github.com/danielmoore/ts-babel-node/issues/15 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index e8fe1b8..1bbc058 100644 --- a/index.js +++ b/index.js @@ -53,7 +53,7 @@ function hook(base, m, filename) { } function compile(base, code, filename) { - var sourcemap = convertSourceMap.fromMapFileSource(code, '.').toObject(); + var sourcemap = convertSourceMap.fromSource(code).toObject(); code = convertSourceMap.removeMapFileComments(code); var babelOutput = babel.transform(code, getBabelOpts(filename, sourcemap));