Closed samuelreichor closed 3 days ago
Ideally, it would be great if the PostCSS config defined in the Nuxt config could work seamlessly here as well. However, I assume this is out of your control due to how Tailwind handles its own stuff.
Hey, thanks for opening an issue on this repository. I would be happy to help you in this scenario.
First, about the config, you could pass ./.nuxt/tailwind.config.cjs
to the CLI instead of your own config as that may be more inline to your Nuxt project.
Is there a way to disable Nuxt’s PostCSS configuration
You could still share the PostCSS options between Nuxt and your CLI by having a postcss.config.js
(and import it to nuxt.config
).
You can see here how we handle the PostCSS options:
Maybe we can provide you with an option to also override the tailwindcss
value there (but its tricky as this is the main functionality of the module unless one explicitly overrides it) - what value would you be looking to pass that can help with your case? I think the above would help equally. Let me know what you think (closing but we can continue the thread).
Hii @ineshbose thank you for your great help! This works for me :)
Hi, I'm not entirely sure if this qualifies as a bug or a feature request, so please feel free to adjust the label accordingly. 🙂
I need to run a tailwind CLI command that looks like this:
The purpose of this command is to compile all Tailwind styles into a static CSS file, which I can then use outside of the project. In my case, I need this file for a PHP CMS.
The issue arises with the --postcss flag in the tailwind CLI, as it requires a valid postcss configuration. It's generally recommended to avoid creating a standalone PostCSS file when working with Nuxt, which means I need two separate PostCSS configurations: one defined in the Nuxt config and another as a standalone file for the CLI that does nothing.
This setup feels a bit inconvenient. Is there a way to disable Nuxt’s PostCSS configuration temporarily and rely solely on the standalone PostCSS config file for this use case?