nuxt-modules / tailwindcss

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

[DX] Expose `defineConfig` utility #842

Open ineshbose opened 1 month ago

ineshbose commented 1 month ago

Is your feature request related to a problem? Please describe.

The inline tailwind config tailwindcss.config is one point of configuration that is typed (but limited to primitives and doesn't help with editor support), in that case we encourage the standard tailwind.config but our config type definition is more flexible that the standard config due to defu. Moreover, we have all configs getting merged, so the source of truth for the tailwind config is .nuxt/tailwind.config.cjs.

Describe the solution you'd like

A defineConfig utility that give the type definition for the configuration, but moreover, this utility can be programmed for the Tailwind VSCode IntelliSense plugin to read .nuxt/tailwind.config.cjs possibly (need to resolve circular import, but this would be incredible).

Describe alternatives you've considered

Additional context