Skip to content

Include/exclude config for bun run --watch #5278

@timnghg

Description

@timnghg

What is the problem this feature would solve?

I would like to propose improvements to the bun run --watch command in order to make it more versatile and applicable to a wider range of use cases.

E.g. prevent hard/soft restart when tsx files changed.

What is the feature you are proposing to solve the problem?

Include/exclude glob config for watch mode

1. bunfig.toml

[watch]
excludes = ["**/*.tsx"]
includes = ["**/*.ts"]

2. CLI

bun run --watch --watch-includes=**/*.ts --watch-excludes=**/*.tsx

What alternatives have you considered?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions