[Prettier Plugin] prettier-tailwind daisy ui formatting issues #8380
-
Hey there, just created a new Next.js project with tailwind and daisyui. When running prettier, it detects the prettier-plugin-tailwindcss and tries to run the formater. The issue is the following: command: stdout output:
and when running: the file output is:
As you can see, it is adding the output of daisyui in the file. Is this a problem with the tailwindcss prettier plugin, the daisyui tailwind plugin or prettier? Any suggestions on how to fix it? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
I'll add that the problem only happens for me when using the prettier inside This seems to be a specific bad interaction between daisyui and prettier-plugin-tailwindcss. Maybe there's something the daisyui team can do about it since it doesn't happen without it installed. |
Beta Was this translation helpful? Give feedback.
-
This is not something I can fix on my end. daisyUI just has A workaround is to disable daisyUI logs from module.exports = {
//...
daisyui: {
logs: false,
//...
},
} |
Beta Was this translation helpful? Give feedback.
-
Yeah prettier-plugin-tailwindcss with daisy plugin breaks prettier. It works fine after uninstalling prettier-plugin-tailwindcss. We need a fix for this |
Beta Was this translation helpful? Give feedback.
This is not something I can fix on my end. daisyUI just has
console.log
s in this file and it's meant to be printed on terminal after building the CSS, to inform the developer about the stuff daisyUI is adding.It should only be on the terminal (because it's just a console.log) and should not be added to the output file.
A workaround is to disable daisyUI logs from
tailwind.config.js
: