tsx icon indicating copy to clipboard operation
tsx copied to clipboard

Support for watching hidden files

Open boxizen opened this issue 1 year ago • 5 comments

Feature request

Allows monitoring changes starting with ., like .env or other hidden files.

Why?

Reading hidden files in ts files is a special requirement we encounter in business development.

For example, we will keep some secret data locally on the server by means of hidden files. When adjusting the content of hidden files, the result should also be real-time refresh, but tsx excludes hidden files from the monitoring range by default, which will not meet this requirement.

For the same case, please refer to https://github.com/esbuild-kit/tsx/issues/181

Alternatives

In order to meet such requirements, it is necessary to add the monitoring capability of dependent files other than js/ts first, like the capabilities provided by https://github.com/esbuild-kit/tsx/pull/208.

Then exclude rules that match the currently watched file from the default ignored rules. For example, if I watch .env file, **/.* should be removed from the ignored rules, as shown in the figure below.

Additional context

boxizen avatar Mar 24 '23 03:03 boxizen