Skip to content

Watch copied files in watch mode #720

@schplitt

Description

@schplitt

Clear and concise description of the problem

As a developer using tsdown in watch mode, I want files specified in the copy option to trigger rebuilds when modified, so that I don't need to manually restart the watch process.

Currently, modifying copied files doesn't trigger a rebuild in watch mode.

Suggested solution

Add the files/globs specified in the copy configuration to the watch mode file watcher. When these files change, trigger a rebuild and re-copy them to the output directory.

Alternative

Add an opt-in watchCopy boolean configuration option, though watching copied files seems like expected default behavior.

Additional context

Minimal reproduction available at https://github.com/schplitt/tsdownCopyWatchRepro

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions