Skip to content

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

Closed
@pinzonjulian

Description

@pinzonjulian

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions