Skip to content

Commit

Permalink
Do not cache non-existent JS config files forever (#12211)
Browse files Browse the repository at this point in the history
Missed a spot in #11906. Currently if you don't have a JS config file and then add one to your project, it will not be picked up without restarting the process. Changing from caching forever to never caching when files don't exist fixes the issue.
  • Loading branch information
devongovett committed Feb 18, 2021
1 parent 0e06a38 commit 35c4114
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-core/src/config/files/configuration.js
Expand Up @@ -167,7 +167,7 @@ const readConfigJS = makeStrongCache(function* readConfigJS(
}>,
): Handler<ConfigFile | null> {
if (!fs.exists.sync(filepath)) {
cache.forever();
cache.never();
return null;
}

Expand Down

0 comments on commit 35c4114

Please sign in to comment.