Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for sourceMapTarget removal in Babel v7.0.0-beta.41 #149

Merged
merged 1 commit into from
Mar 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm actually a little surprised we even have this line. I wonder if it is actually needed.

applySourceMap(file, res.map);
}

Expand Down