()
| 184 | const resolveTWConfig = await import('tailwindcss/resolveConfig.js').then(m => m.default || m).catch(() => (c: unknown) => c) as <T extends Partial<TWConfig>>(config: T) => T |
| 185 | |
| 186 | const loadConfigs = async () => { |
| 187 | const moduleConfigs = await getModuleConfigs() |
| 188 | resolvedConfigsCtx.set(moduleConfigs, true) |
| 189 | const tailwindConfig = moduleConfigs.reduce((acc, curr) => configMerger(acc, curr?.config ?? {}), {} as Partial<TWConfig>) |
| 190 | const clonedConfig = configMerger(undefined, tailwindConfig) |
| 191 | |
| 192 | // Allow extending tailwindcss config by other modules |
| 193 | configUpdatedHook['main-config'] = '' |
| 194 | await nuxt.callHook('tailwindcss:config', clonedConfig) |
| 195 | trackObjChanges('main-config', tailwindConfig, clonedConfig) |
| 196 | |
| 197 | const resolvedConfig = resolveTWConfig(clonedConfig) |
| 198 | await nuxt.callHook('tailwindcss:resolvedConfig', resolvedConfig as any, twCtx.tryUse()?.config as any ?? undefined) |
| 199 | twCtx.set({ config: resolvedConfig }) |
| 200 | |
| 201 | return tailwindConfig |
| 202 | } |
| 203 | |
| 204 | const generateConfig = () => { |
| 205 | const ctx = twCtx.tryUse() |
no test coverage detected