From 7573cc7d2ab9ad0843ba1682294a88fe30676e0f Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Wed, 14 Jun 2023 13:43:44 -0400 Subject: [PATCH] Fix stuff --- src/lib/setupTrackingContext.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/setupTrackingContext.js b/src/lib/setupTrackingContext.js index 5bd90701d..ba4d9c228 100644 --- a/src/lib/setupTrackingContext.js +++ b/src/lib/setupTrackingContext.js @@ -28,7 +28,7 @@ function getCandidateFiles(context, tailwindConfig) { } // Get the config object based on a path -function getTailwindConfig(configOrPath, cssThemeValues) { +function getTailwindConfig(configOrPath, cssThemeValues = {}) { let userConfigPath = resolveConfigPath(configOrPath) if (userConfigPath !== null) { @@ -57,7 +57,7 @@ function getTailwindConfig(configOrPath, cssThemeValues) { delete require.cache[file] } let newConfig = validateConfig( - resolveConfig({ theme: cssThemeValues }, loadConfig(userConfigPath)) + resolveConfig(loadConfig(userConfigPath), { theme: cssThemeValues }) ) let newHash = hash(newConfig) configPathCache.set(userConfigPath, [newConfig, newHash, newDeps, newModified]) @@ -66,8 +66,8 @@ function getTailwindConfig(configOrPath, cssThemeValues) { // It's a plain object, not a path let newConfig = resolveConfig( - { theme: cssThemeValues }, - configOrPath?.config ?? configOrPath ?? {} + configOrPath?.config ?? configOrPath ?? {}, + { theme: cssThemeValues } ) newConfig = validateConfig(newConfig)