Fix explicit @source with allow-list gitignore

Closed
YU
5mo ago
+91-0

Summary

Fixes #19844.

Explicit @source directories can currently stay hidden when the repository root uses an allow-list .gitignore such as * followed by ! exceptions. In that setup the walker can skip the explicitly configured source root before Tailwind gets a chance to scan it.

This detects allow-list root .gitignore files and only adds an override when the explicit source base is actually ignored by that allow-list. Existing deny-list behavior and nested ignore rules inside normal source roots continue to be covered by the scanner tests.

Test plan

  • cargo fmt --check
  • cargo test -p tailwindcss-oxide --test scanner
  • pnpm build