Need Assistance?

support@tutorialshub.in

Advanced Tailwind CSS

Source detection with @source

ADVERTISEMENT
Tailwind CSS Free Lesson
5 min read
ADVERTISEMENT

When automatic detection needs help

Tailwind automatically detects many source files, but component libraries or unusual directory structures can require explicit source registration.

Third-party component libraries

If a shared UI package contains Tailwind class names that are not in the application's detected source tree, @source can explicitly tell Tailwind to scan that location.

Avoid broad scanning

Scan only relevant source directories. Including huge dependency trees unnecessarily can increase work and make class generation harder to reason about.

ADVERTISEMENT