fix(module): search in tailwind colors for primary and gray

This commit is contained in:
Benjamin Canac
2022-06-30 17:36:50 +02:00
parent 00e0ab39f8
commit 10d89d3cd1

View File

@@ -85,9 +85,9 @@ export default defineNuxtModule<ModuleOptions>({
// @ts-ignore
tailwindConfig.theme.extend.colors = tailwindConfig.theme.extend.colors || {}
// @ts-ignore
globalColors.primary = tailwindConfig.theme.extend.colors.primary = globalColors[primary]
globalColors.primary = tailwindConfig.theme.extend.colors.primary = globalColors[primary] || colors[primary]
// @ts-ignore
globalColors.gray = tailwindConfig.theme.extend.colors.gray = globalColors[gray]
globalColors.gray = tailwindConfig.theme.extend.colors.gray = globalColors[gray] || colors[gray]
const variantColors = excludeColors(globalColors)
const safeColorsAsRegex = colorsAsRegex(variantColors)