saadeghi / daisyui

๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ โ€ƒThe most popular, free and open-source Tailwind CSS component library
https://daisyui.com
MIT License
33.97k stars 1.3k forks source link

Weird console logging output #283

Closed Wkasel closed 3 years ago

Wkasel commented 3 years ago

Issue description

Seeing a weird bug with the daisy UI logger printing on repeat in next.js on dev.

๐ŸŒผ daisyUI components 1.16.1 https://github.com/saadeghi/daisyui โœ”๏ธŽ Including: base, components, themes[22], utilities

Steps to reproduce the issue

  1. setup a basic Next.JS boilerplate with Tailwind, and styled components, in my case superplate
  2. Added Daisy UI
  3. Ran Yarn Dev

What's the expected result?

What's the actual result?

Additional details / screenshot

Wkasel commented 3 years ago

I realized that screen recording might cut it short - here is a full recording of what happens

saadeghi commented 3 years ago

@Wkasel you can disable logs from config

Wkasel commented 3 years ago

Ahh, ok. No problem. Any idea why this was happening though? Is that expected behavior?

saadeghi commented 3 years ago

@Wkasel No. It's not expected behavior. daisyUI only prints the the log once (showing version number and shows what is included based on the config) when the CSS file is built.
However, all build tools don't work the same way when they are watching the changes.

I'm not sure about the reason why the CSS build is running multiple times on your build,
But the fastest way is to disable the logs config. It's just there to show the version and included files. nothing more.