Allow regular plugins/presets resolution algorithm for packages outside of the monorepo (#7582)
This commit is contained in:
parent
1b03906da4
commit
1e1a89ca70
@ -118,8 +118,11 @@ function wrapPackagesArray(type, names, optionsDir) {
|
||||
|
||||
val[0] = path.resolve(optionsDir, val[0]);
|
||||
} else {
|
||||
// check node_modules/babel-x-y
|
||||
val[0] = __dirname + "/../../babel-" + type + "-" + val[0];
|
||||
const monorepoPath = __dirname + "/../../babel-" + type + "-" + val[0];
|
||||
|
||||
if (fs.existsSync(monorepoPath)) {
|
||||
val[0] = monorepoPath;
|
||||
}
|
||||
}
|
||||
|
||||
return val;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user