You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When installing DaysiUI in a brand new Rails app using the Tailwind Standalone CLI via tailwind-rails and the Bundle File instructions in the docs is not having the desired effect. All of DaisyUI seems to be added to the app/assets/builds/tailwind.css output file.
My theory is that Tailwind is interpreting the daisyui.js file as a source file of the project because it doesn't fall into any of the rules of files ignored by Tailwind's scanner.
The resulting file weighs 177kb. If I comment @plugin ./daisiui.js the file weighs 8kb.
I recently opened an issue in DaisyUI due to this same problem and it was determined that the source of it is most likely Tailwind. saadeghi/daisyui#3621
It seems to me that Tailwind could automatically ignore plugin's path to prevent this from happening. If not, users are forced to list all paths manually which kind of goes against the objective of the new engine.
Thanks!
The text was updated successfully, but these errors were encountered:
pinzonjulian
changed the title
Plugin in Standalone CLI is picked up entirely.
Plugin in source code is picked up as application code in Standalone CLI mode
Mar 8, 2025
Hey! Yeah because the file is checked-in in your case, it'll be scanned by Tailwind CSS. We'll be adding a way to selectively opt-out of scanning files very soon, that should help with your case too! Thanks for the bug report, I'll keep you posted.
Linking this related feature request for context: #15943
v4.0.12
For example: v4.0.6
What build tool (or framework if it abstracts the build tool) are you using?
Ruby on Rails
tailwindcss-rails which uses the Standalone CLI
What version of Node.js are you using?
None
What browser are you using?
N/A
What operating system are you using?
macOS 15.2
Reproduction URL
https://github.com/pinzonjulian/daisy-bug
Describe your issue
When installing DaysiUI in a brand new Rails app using the Tailwind Standalone CLI via tailwind-rails and the Bundle File instructions in the docs is not having the desired effect. All of DaisyUI seems to be added to the app/assets/builds/tailwind.css output file.
My theory is that Tailwind is interpreting the daisyui.js file as a source file of the project because it doesn't fall into any of the rules of files ignored by Tailwind's scanner.
The resulting file weighs 177kb. If I comment @plugin ./daisiui.js the file weighs 8kb.
I recently opened an issue in DaisyUI due to this same problem and it was determined that the source of it is most likely Tailwind. saadeghi/daisyui#3621
To fix the issue I had to ignore all sources and add them manually
pinzonjulian/daisy-bug@main...set-explicit-sources
It seems to me that Tailwind could automatically ignore plugin's path to prevent this from happening. If not, users are forced to list all paths manually which kind of goes against the objective of the new engine.
Thanks!
The text was updated successfully, but these errors were encountered: