Skip to content

Commit

Permalink
Do not cache non-existent JS config files forever
Browse files Browse the repository at this point in the history
Missed a spot in babel#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 Oct 18, 2020
1 parent 63567f0 commit b2382aa
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 @@ -168,7 +168,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 b2382aa

Please sign in to comment.