Closed
Description
What version of Tailwind CSS are you using?
v4.0.0-beta.9
What build tool (or framework if it abstracts the build tool) are you using?
@tailwindcss/cli@4.0.0-beta.9
What version of Node.js are you using?
$ node --version
v23.5.0
What browser are you using?
N/A
What operating system are you using?
macOS
Reproduction URL
git clone https://gist.github.com/condemil/b9990c17d419a0d9d1f0cc0f637fdb3c tw4-watch-gitignore-repro
Describe your issue
When tailwindcss cli is running in watch mode and ignored file is modified the output will contain css from the ignored file:
To reproduce:
- Run the tailwindcss cli in watch mode
$ DEBUG=1 npx @tailwindcss/cli@4.0.0-beta.9 -i input.css -o output.css -w
≈ tailwindcss v4.0.0-beta.9
Done in 35ms
[36.26ms] [@tailwindcss/cli] (initial build)
[ 9.24ms] ↳ Setup compiler
[ 7.97ms] ↳ Scan for candidates
[10.85ms] ↳ Build CSS
[ 1.84ms] ↳ Write output
- Check that
output.css
doesn't haveh-100
$ cat output.css | grep h-1
$
- Modify
test.go
and observe tailwindcss cli log
Done in 11ms
[11.25ms] [@tailwindcss/cli] (watcher)
[ 1.66ms] ↳ Scan for candidates
[ 7.72ms] ↳ Build CSS
[ 1.64ms] ↳ Write output
- Check that
output.css
now haveh-100
$ cat output.css | grep h-1
.h-100 {