Skip to content

Document the --watch=always flag on the CLI #1835

Closed
tailwindlabs/tailwindcss
#18337
@alilleybrinker

Description

@alilleybrinker

While trying to run the CLI as a subcommand within a project (running from Rust code), I encountered a challenge where the tailwindcss command would exit rather than watching and rebuilding, even with the -w/--watch flag. It turns out by default that if stdin is closed, tailwindcss will close too to avoid becoming a zombie process, and that you can turn off this behavior with the un-documented flag --watch=always. The code for this is here: https://github.com/tailwindlabs/tailwindcss/blob/next/packages/%40tailwindcss-cli/src/commands/build/index.ts#L218-L224

It would be nice if this flag were documented somewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions