79656198

Date: 2025-06-06 16:30:05
Score: 1.5
Natty:
Report link

With angular 19 and tailwind 4.1, I simply add @source in my main style.scss, and all tailwind CSS classes used by my lib are correctly exported

@use "tailwindcss";
@source "../node_modules/my-lib";

From documentation : https://tailwindcss.com/docs/functions-and-directives#source-directive

Use the @source directive to explicitly specify source files that aren't picked up by Tailwind's automatic content detection:

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @source
  • Low reputation (1):
Posted by: user1841081