Skip to content

Commit 56a5740

Browse files
authored
fix(server): avoid chokidar throttling on startup (#15347)
1 parent 129d0d0 commit 56a5740

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vite/src/node/server/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ export async function _createServer(
414414
const watcher = watchEnabled
415415
? (chokidar.watch(
416416
// config file dependencies and env file might be outside of root
417-
[root, ...config.configFileDependencies, config.envDir],
417+
[...new Set([root, ...config.configFileDependencies, config.envDir])],
418418
resolvedWatchOptions,
419419
) as FSWatcher)
420420
: createNoopWatcher(resolvedWatchOptions)

0 commit comments

Comments
 (0)