Ensure @tailwindcss/cli watches the input file#20246
Conversation
This is typically handled automatically, but if the file lives in an ignored folder then it won't trigger a rebuild. With this in place, we force watching the input CSS file regardless of the .gitignore and `@source` rules.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe build command's 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Confidence Score: 5/5Safe to merge. The change is a two-line addition inside The fix is minimal and well-contained: it reuses the existing No files require special attention. Reviews (2): Last reviewed commit: "update CHANGELOG" | Re-trigger Greptile |
This PR fixes an issue where if the
--inputfile (when using@tailwindcss/cli) lives in an ignored folder, then changes to the input file won't trigger a rebuild.This happened in #17632 where the input file lives in the
assets/folder which is ignored by default (because of thesource (none)).However, if you make a change to the input file, then the CLI doesn't restart which means that you can't update the
@sourcedirectives without quitting the program and re-starting it manually.This PR solves that by automatically injecting an
@sourcewith the path to the input file. This way the CLI will see changes, even if the input file is in an ignored directory.Fixes: #17632
Test plan
Before:

After:
