From b2382aa36e48ddbf4c69b2876a50aa2fbfbda3db Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 18 Oct 2020 14:36:24 -0700 Subject: [PATCH] Do not cache non-existent JS config files forever 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. --- packages/babel-core/src/config/files/configuration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-core/src/config/files/configuration.js b/packages/babel-core/src/config/files/configuration.js index 3107786cf3d8..a2f07da520e5 100644 --- a/packages/babel-core/src/config/files/configuration.js +++ b/packages/babel-core/src/config/files/configuration.js @@ -168,7 +168,7 @@ const readConfigJS = makeStrongCache(function* readConfigJS( }>, ): Handler { if (!fs.exists.sync(filepath)) { - cache.forever(); + cache.never(); return null; }