resolveChokidarOptions() — vite Function Reference
Architecture documentation for the resolveChokidarOptions() function in watch.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD 5c18d7ac_9113_a831_b6e2_bda4c7fd6ddd["resolveChokidarOptions()"] b4c4dcfb_d52b_008a_a6fc_ed4f2bf1f714["watch.ts"] 5c18d7ac_9113_a831_b6e2_bda4c7fd6ddd -->|defined in| b4c4dcfb_d52b_008a_a6fc_ed4f2bf1f714 94ad7f99_b02e_152e_c5a9_749d6de8d3c0["buildEnvironment()"] 94ad7f99_b02e_152e_c5a9_749d6de8d3c0 -->|calls| 5c18d7ac_9113_a831_b6e2_bda4c7fd6ddd 24ecf2a1_3c09_d451_76f3_9485b4e993f8["_createServer()"] 24ecf2a1_3c09_d451_76f3_9485b4e993f8 -->|calls| 5c18d7ac_9113_a831_b6e2_bda4c7fd6ddd 19ce2051_6a74_4b8b_104d_ec006cd7075f["arraify()"] 5c18d7ac_9113_a831_b6e2_bda4c7fd6ddd -->|calls| 19ce2051_6a74_4b8b_104d_ec006cd7075f style 5c18d7ac_9113_a831_b6e2_bda4c7fd6ddd fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/vite/src/node/watch.ts lines 51–79
export function resolveChokidarOptions(
options: WatchOptions | undefined,
resolvedOutDirs: Set<string>,
emptyOutDir: boolean,
cacheDir: string,
): WatchOptions {
const { ignored: ignoredList, ...otherOptions } = options ?? {}
const ignored: WatchOptions['ignored'] = [
'**/.git/**',
'**/node_modules/**',
'**/test-results/**', // Playwright
escapePath(cacheDir) + '/**',
...arraify(ignoredList || []),
]
if (emptyOutDir) {
ignored.push(
...[...resolvedOutDirs].map((outDir) => escapePath(outDir) + '/**'),
)
}
const resolvedWatchOptions: WatchOptions = {
ignored,
ignoreInitial: true,
ignorePermissionErrors: true,
...otherOptions,
}
return resolvedWatchOptions
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does resolveChokidarOptions() do?
resolveChokidarOptions() is a function in the vite codebase, defined in packages/vite/src/node/watch.ts.
Where is resolveChokidarOptions() defined?
resolveChokidarOptions() is defined in packages/vite/src/node/watch.ts at line 51.
What does resolveChokidarOptions() call?
resolveChokidarOptions() calls 1 function(s): arraify.
What calls resolveChokidarOptions()?
resolveChokidarOptions() is called by 2 function(s): _createServer, buildEnvironment.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free