Only resolve package.json when relative configs are enabled (#13063)
This commit is contained in:
parent
8e8954b470
commit
06eb3b73cb
@ -201,17 +201,17 @@ export function* buildRootChain(
|
||||
mergeChain(configFileChain, result);
|
||||
}
|
||||
|
||||
const pkgData =
|
||||
typeof context.filename === "string"
|
||||
? yield* findPackageData(context.filename)
|
||||
: null;
|
||||
|
||||
let ignoreFile, babelrcFile;
|
||||
let isIgnored = false;
|
||||
const fileChain = emptyChain();
|
||||
// resolve all .babelrc files
|
||||
if (
|
||||
(babelrc === true || babelrc === undefined) &&
|
||||
typeof context.filename === "string"
|
||||
) {
|
||||
const pkgData = yield* findPackageData(context.filename);
|
||||
|
||||
if (
|
||||
pkgData &&
|
||||
babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)
|
||||
) {
|
||||
@ -253,6 +253,7 @@ export function* buildRootChain(
|
||||
fileChain.files.add(babelrcFile.filepath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (context.showConfig) {
|
||||
console.log(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user