diff --git a/src/lib/setupTrackingContext.js b/src/lib/setupTrackingContext.js index 70e7cb684139..379f99ca994d 100644 --- a/src/lib/setupTrackingContext.js +++ b/src/lib/setupTrackingContext.js @@ -54,6 +54,9 @@ function getTailwindConfig(configOrPath) { // It has changed (based on timestamps), or first run for (let file of newDeps) { + if (!file || !require.cache || !require.cache[file]) { + continue + } delete require.cache[file] } let newConfig = validateConfig(resolveConfig(loadConfig(userConfigPath)))