diff options
| author | Shulhan <ms@kilabit.info> | 2024-09-15 13:36:40 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-09-15 13:36:40 +0700 |
| commit | 98cfe314d85b9c2a92f84416d79f95c92e8a6d9d (patch) | |
| tree | eef70b62097b3b958540f2264cc7af933eeb7096 | |
| parent | 3463fea5c0744f680a53ecc6f077447c8b43a0b1 (diff) | |
| download | pakakeh.ts-98cfe314d85b9c2a92f84416d79f95c92e8a6d9d.tar.xz | |
tsconfig.json: set the watch options
For watchFile and watchDirectory we use useFsEvents (the default):
Attempt to use the operating system/file system’s native events
for directory changes.
dynamicPriorityPolling: Use a dynamic queue where less-frequently
modified files will be checked less often.
synchronousWatchDirectory: Synchronously call callbacks and update
the state of directory watchers on platforms that don`t support
recursive watching natively.
Instead of giving a small timeout to allow for potentially multiple
edits to occur on a file.
Reference: https://www.typescriptlang.org/docs/handbook/configuring-watch.html
| -rw-r--r-- | tsconfig.json | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tsconfig.json b/tsconfig.json index d7fc0f4..05e99c8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -33,5 +33,18 @@ "vfs/example.ts", "vfs/vfs.ts", "websocket_client.ts" - ] + ], + "watchOptions": { + // Use native file system events for files and directories + "watchFile": "useFsEvents", + "watchDirectory": "useFsEvents", + // Poll files for updates more frequently + // when they're updated a lot. + "fallbackPolling": "dynamicPriority", + // Don't coalesce watch notification + "synchronousWatchDirectory": true, + // Finally, two additional settings for reducing the amount of possible + // files to track work from these directories + "excludeDirectories": ["**/node_modules"] + } } |
