@Dale-Lin
2022-09-15T19:58:49.000000Z
字数 503
阅读 331
TypeScript
--watch
参数基于 fs.watch
(目录)和 fs.watchFile
(文件)实现了编译器
{
"compilerOptions": {
"target": "es2020",
"moduleResolution": "node"
// ...
},
// options for file/directory watching
"watchOptions": {
"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,
"excludeDirectories": ["**/node_modules", "_build"],
"excludeFiles": ["build/fileWhichChangesOften.ts"]
}
}