Skip to content

@source does not scan node_modules #19040

@imaginario27

Description

@imaginario27

What version of Tailwind CSS are you using?

4.1.13

What build tool (or framework if it abstracts the build tool) are you using?

Vite (nuxt 4.1.2)

What version of Node.js are you using?

v22.19.0

What browser are you using?

Brave

What operating system are you using?

Windows

Reproduction URL

Not available. Working locally.

Package structure

Image

Describe your issue

Let me expose what I am trying to achieve.

I have a Nuxt base project on the one hand and on the other hand I have another Design System Nuxt project which works as a layer for the base project.

The Design system is created with Tailwind (4.1.13) and exported as a package.

This package is installed under node_modules. Everything works fine with the exception that Tailwind is unable to scan the node_modules folder using @source inside the main css file.

I have tried @source with a local layer (design system in a separate folder) and it works fine, Nevertheless, as soon as I try to use the node_module directory, it does not work, even if the Tailwind documentation (https://tailwindcss.com/docs/detecting-classes-in-source-files) explain you can do this.

So I guess this might be a bug.

Please, if you have another temporary solution to solve this issue, please let me know.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions