Skip to content

watch mode: --exclude does not work for parent/adjacent directories #785

Description

@see7788

Acknowledgements

  • I read the documentation and searched existing issues to avoid duplicates
  • I understand this is a bug tracker and anything other than a proven bug will be closed
  • I understand this is a free project and relies on community contributions
  • I read and understood the Contribution guide

Minimal reproduction URL

..............

Problem & expected behavior (under 200 words)

tsx version: 4.21.0
OS: Windows 11

Describe the bug
tsx watch --exclude cannot exclude files in parent/adjacent directories.

I'm running tsx watch in:
F:\pro\testtaro\apps\honoapp

But it keeps watching and restarting on changes from:
F:\pro\testtaro\apps\reactapp\node_modules\.vite-temp\*.mjs

To Reproduce
Run:
tsx watch --exclude "/*.mjs" --exclude "../reactapp//*.mjs" src/index.ts

Expected behavior
--exclude should ignore files in parent/adjacent directories.

Actual behavior
Files in parent/adjacent directories still trigger restart.

Bugs are expected to be fixed by those affected by it

  • I'm interested in working on this issue

Compensating engineering work will speed up resolution and support the project

  • I'm willing to offer $10 for financial support

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions