Skip to content

Commit 3561dce

Browse files
committed
chore: avoid watcher outdir
1 parent a2d094f commit 3561dce

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/vite/src/node/watch.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export function resolveEmptyOutDir(
5151
export function resolveChokidarOptions(
5252
options: WatchOptions | undefined,
5353
resolvedOutDirs: Set<string>,
54-
emptyOutDir: boolean,
54+
_emptyOutDir: boolean,
5555
cacheDir: string,
5656
): WatchOptions {
5757
const { ignored: ignoredList, ...otherOptions } = options ?? {}
@@ -62,11 +62,12 @@ export function resolveChokidarOptions(
6262
escapePath(cacheDir) + '/**',
6363
...arraify(ignoredList || []),
6464
]
65-
if (emptyOutDir) {
65+
// TODO(underfin): revert it if the dev build only write output to memory.
66+
// if (emptyOutDir) {
6667
ignored.push(
6768
...[...resolvedOutDirs].map((outDir) => escapePath(outDir) + '/**'),
6869
)
69-
}
70+
// }
7071

7172
const resolvedWatchOptions: WatchOptions = {
7273
ignored,

0 commit comments

Comments
 (0)