Skip to content

fix: use --watch=always to prevent tailwindcss watcher from dying silently#1315

Merged
davidpoblador merged 1 commit into
mainfrom
worktree-enchanted-launching-moore
Feb 26, 2026
Merged

fix: use --watch=always to prevent tailwindcss watcher from dying silently#1315
davidpoblador merged 1 commit into
mainfrom
worktree-enchanted-launching-moore

Conversation

@davidpoblador

Copy link
Copy Markdown
Member

Summary

  • Use --watch=always flag in the template's dev:css script to prevent the tailwindcss
    watcher from exiting when stdin is closed by bun run --parallel

Root Cause

The tailwindcss CLI uses stdin closure as a signal to exit cleanly. When spawned via
bun run --parallel, stdin is not connected to child processes (it's piped/closed rather
than being a TTY). The watcher detects the closed stdin, interprets it as "parent is gone",
and exits with code 0 immediately after the first build. Meanwhile bun build --watch
(esbuild) doesn't use stdin as a lifecycle signal, so it survives.

The --watch=always flag was added to tailwindcss specifically for this class of problem
(tailwindlabs/tailwindcss#8517, tailwindlabs/tailwindcss#9966).

Closes #1313

Test plan

  • Run bun dev and verify the tailwindcss watcher stays alive
  • Edit config.css or a template file and confirm CSS is rebuilt automatically
  • Run just local-all and verify everything still works
  • Check ps aux | grep tailwind confirms the process is running

🤖 Generated with Claude Code

…ently

The tailwindcss CLI uses stdin closure as a signal to exit. When spawned
via `bun run --parallel`, stdin is not connected to child processes,
causing the watcher to exit with code 0 immediately after the first
build. Using `--watch=always` keeps the watcher alive regardless of
stdin state.

Closes #1313

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@davidpoblador davidpoblador merged commit 3c65ce7 into main Feb 26, 2026
2 checks passed
@davidpoblador davidpoblador deleted the worktree-enchanted-launching-moore branch February 26, 2026 20:02
davidpoblador pushed a commit that referenced this pull request Feb 26, 2026
🤖 I have created a release *beep* *boop*
---


##
[8.6.4](v8.6.3...v8.6.4)
(2026-02-26)


### Bug Fixes

* use --watch=always to prevent tailwindcss watcher from dying silently
([#1315](#1315))
([3c65ce7](3c65ce7))
* use lint-po fork with gettext plural form support
([#1314](#1314))
([10487a4](10487a4)),
closes [#1312](#1312)


### Miscellaneous Chores

* **deps:** update github artifact actions (major)
([#1316](#1316))
([e4b2922](e4b2922))


### Documentation Updates

* add ad-hoc database operations guide for AI agents
([#1310](#1310))
([6cbaff5](6cbaff5))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CSS watcher (tailwindcss -w) dies silently during bun dev / just local-all

1 participant