Allow overwritting of sourceRoot (#3685)
Also replaces lodash/extend with Object.assign
This commit is contained in:
parent
460714b126
commit
71dff8c834
@ -48,10 +48,11 @@ function compile(filename) {
|
||||
let result;
|
||||
|
||||
// merge in base options and resolve all the plugins and presets relative to this file
|
||||
let opts = new OptionManager().init(extend(deepClone(transformOpts), {
|
||||
filename,
|
||||
sourceRoot: path.dirname(filename)
|
||||
}));
|
||||
let opts = new OptionManager().init(extend(
|
||||
{ sourceRoot: path.dirname(filename) }, // sourceRoot can be overwritten
|
||||
deepClone(transformOpts),
|
||||
{ filename }
|
||||
));
|
||||
|
||||
let cacheKey = `${JSON.stringify(opts)}:${babel.version}`;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user