Correct source map paths for babel-register. (#3523)

This commit is contained in:
Rolf Timmermans 2016-07-22 17:11:31 +02:00 committed by Henry Zhu
parent 879f69f0fb
commit c8bd9e3ffb

View File

@ -48,8 +48,11 @@ function compile(filename) {
let result;
// merge in base options and resolve all the plugins and presets relative to this file
let relativePath = getRelativePath(filename);
let opts = new OptionManager().init(extend(deepClone(transformOpts), {
filename
filename,
sourceMapTarget: relativePath,
sourceFileName: relativePath,
}));
let cacheKey = `${JSON.stringify(opts)}:${babel.version}`;