Skip to content

Commit

Permalink
Fix for sourceMapTarget removal in Babel v7.0.0-beta.41 (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
hzoo authored Mar 14, 2018
1 parent ba247cc commit 241905b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 241905b

Please sign in to comment.