nuxt-modules / tailwindcss

Tailwind CSS module for Nuxt
https://tailwindcss.nuxtjs.org
MIT License
1.6k stars 180 forks source link

call `tailwindcss:config` hook after all modules are initialised #826

Closed danielroe closed 1 month ago

danielroe commented 2 months ago

At the moment, tailwindcss:config is called synchronously when this module runs, meaning other modules which hope to use tailwindcss or modify its configuration must be registered before it.

However, dependencies between modules aren't ideal. Instead, we should register a hook in modules:done that finally calls tailwindcss:config. Alternatively, we could also call tailwindcss:config directly in getContents of a template.

ineshbose commented 2 months ago

I'm looking to address this in #818 as that is a complete rewrite of loading the config. 👍