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;
|
let result;
|
||||||
|
|
||||||
// merge in base options and resolve all the plugins and presets relative to this file
|
// merge in base options and resolve all the plugins and presets relative to this file
|
||||||
let opts = new OptionManager().init(extend(deepClone(transformOpts), {
|
let opts = new OptionManager().init(extend(
|
||||||
filename,
|
{ sourceRoot: path.dirname(filename) }, // sourceRoot can be overwritten
|
||||||
sourceRoot: path.dirname(filename)
|
deepClone(transformOpts),
|
||||||
}));
|
{ filename }
|
||||||
|
));
|
||||||
|
|
||||||
let cacheKey = `${JSON.stringify(opts)}:${babel.version}`;
|
let cacheKey = `${JSON.stringify(opts)}:${babel.version}`;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user