Skip to content

Commit 640ccb5

Browse files
committed
feat(tailwindcss): add tailwindcss:config hook
1 parent 0805494 commit 640ccb5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/module.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,5 +203,12 @@ export default defineNuxtModule<ModuleOptions>({
203203

204204
nuxt.hook('build:before', async () => await generateTokens(tokens, tokensDir, true))
205205
await generateTokens(tokens, tokensDir, true)
206+
207+
// @nuxtjs/tailwindcss support
208+
// @ts-ignore - Module might not exist
209+
nuxt.hook('tailwindcss:config', (tailwindConfig) => {
210+
tailwindConfig.content = tailwindConfig.content ?? []
211+
tailwindConfig.content.push(`${tokensDir}/**/*`)
212+
})
206213
}
207214
})

0 commit comments

Comments
 (0)