From 241905b1c8f58bf1e4b124527f42ea537cdf101c Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Wed, 14 Mar 2018 12:53:53 -0400 Subject: [PATCH] Fix for `sourceMapTarget` removal in Babel v7.0.0-beta.41 (#149) Update for https://github.com/babel/babel/releases/tag/v7.0.0-beta.41 --- index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 5138dfb..c84126e 100644 --- a/index.js +++ b/index.js @@ -29,15 +29,14 @@ module.exports = function (opts) { filename: file.path, filenameRelative: file.relative, sourceMap: Boolean(file.sourceMap), - sourceFileName: file.relative, - sourceMapTarget: file.relative + sourceFileName: file.relative }); const res = babel.transform(file.contents.toString(), fileOpts); if (res !== null) { if (file.sourceMap && res.map) { - res.map.file = replaceExtension(res.map.file); + res.map.file = replaceExtension(file.relative); applySourceMap(file, res.map); }