Skip to content

Plugin in source code is picked up as application code in Standalone CLI mode #17058

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pinzonjulian opened this issue Mar 8, 2025 · 2 comments · Fixed by #17255
Closed

Plugin in source code is picked up as application code in Standalone CLI mode #17058

pinzonjulian opened this issue Mar 8, 2025 · 2 comments · Fixed by #17255

Comments

@pinzonjulian
Copy link

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!

@pinzonjulian 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
@philipp-spiess
Copy link
Member

philipp-spiess commented Mar 11, 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

@pinzonjulian
Copy link
Author

Awesome, thanks!

Do you think as part of that, Tailwind could automatically detect plugin source paths and ignore them automatically? That'd be really cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants