Skip to content

Commit 241905b

Browse files
authored
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
1 parent ba247cc commit 241905b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,14 @@ module.exports = function (opts) {
2929
filename: file.path,
3030
filenameRelative: file.relative,
3131
sourceMap: Boolean(file.sourceMap),
32-
sourceFileName: file.relative,
33-
sourceMapTarget: file.relative
32+
sourceFileName: file.relative
3433
});
3534

3635
const res = babel.transform(file.contents.toString(), fileOpts);
3736

3837
if (res !== null) {
3938
if (file.sourceMap && res.map) {
40-
res.map.file = replaceExtension(res.map.file);
39+
res.map.file = replaceExtension(file.relative);
4140
applySourceMap(file, res.map);
4241
}
4342

0 commit comments

Comments
 (0)