diff --git a/config/server-options.md b/config/server-options.md index 76c67d59..621b99c1 100644 --- a/config/server-options.md +++ b/config/server-options.md @@ -205,11 +205,11 @@ export default defineConfig({ - **型:** `object| null` -[chokidar](https://github.com/paulmillr/chokidar#api) に渡すファイルシステムウォッチャーのオプションです。 +[chokidar](https://github.com/paulmillr/chokidar#getting-started) に渡すファイルシステムウォッチャーのオプションです。`ignored` オプションが渡された場合、Vite は文字列を [picomatch のパターン](https://github.com/micromatch/picomatch#globbing-features)として自動的に変換します。 Vite サーバーのウォッチャーはデフォルトで `root` を監視し、`.git/`、`node_modules/`、および Vite の `cacheDir` と `build.outDir` ディレクトリーをスキップします。監視されているファイルを更新すると Vite は HMR を適用し、必要な場合にのみページを更新します。 -`null` に設定すると、ファイルは監視されません。`server.watcher` は互換性のあるイベントエミッターを返しますが、`add` や `unwatch` を呼び出しても何も起こりません。 +`null` に設定すると、ファイルは監視されません。`server.watcher` はいかなるファイルも監視せず、`add` を呼び出しても何も起こりません。 ::: warning `node_modules` 内のファイルの監視 diff --git a/guide/api-javascript.md b/guide/api-javascript.md index c1b17e71..1c930b1d 100644 --- a/guide/api-javascript.md +++ b/guide/api-javascript.md @@ -110,8 +110,8 @@ interface ViteDevServer { httpServer: http.Server | null /** * chokidar watcher のインスタンス。`config.server.watch` が `null` に - * 設定されている場合、何もしないイベントエミッターを返します。 - * https://github.com/paulmillr/chokidar#api + * 設定されている場合、いかなるファイルも監視せず、`add` を呼び出しても何も起こりません。 + * https://github.com/paulmillr/chokidar#getting-started */ watcher: FSWatcher /**