From 35c41148dd7ef7e21bded71cd87e23e88d4bd7db Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Thu, 18 Feb 2021 06:18:02 -0500 Subject: [PATCH] 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. --- 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 8a3bed914fab..28ce05a380fc 100644 --- a/packages/babel-core/src/config/files/configuration.js +++ b/packages/babel-core/src/config/files/configuration.js @@ -167,7 +167,7 @@ const readConfigJS = makeStrongCache(function* readConfigJS( }>, ): Handler { if (!fs.exists.sync(filepath)) { - cache.forever(); + cache.never(); return null; }