Do not cache non-existent JS config files forever (#12211)

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.
This commit is contained in:
Devon Govett 2021-02-18 06:18:02 -05:00 committed by GitHub
parent 0e06a3822b
commit 35c41148dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -167,7 +167,7 @@ const readConfigJS = makeStrongCache(function* readConfigJS(
}>,
): Handler<ConfigFile | null> {
if (!fs.exists.sync(filepath)) {
cache.forever();
cache.never();
return null;
}