addWatchFile() — vite Function Reference
Architecture documentation for the addWatchFile() function in pluginContainer.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD 31d5b2c5_2267_3dde_fc85_e309cf15eb0d["addWatchFile()"] c261dae5_9c68_4b7d_8b09_fe13190425fe["PluginContext"] 31d5b2c5_2267_3dde_fc85_e309cf15eb0d -->|defined in| c261dae5_9c68_4b7d_8b09_fe13190425fe 95b612c4_17dd_1e1e_8054_97e69290edb4["addWatchFile()"] 95b612c4_17dd_1e1e_8054_97e69290edb4 -->|calls| 31d5b2c5_2267_3dde_fc85_e309cf15eb0d 157cb972_609e_022e_1ec5_3ed6f7e4f45c["cssPlugin()"] 157cb972_609e_022e_1ec5_3ed6f7e4f45c -->|calls| 31d5b2c5_2267_3dde_fc85_e309cf15eb0d 95b612c4_17dd_1e1e_8054_97e69290edb4["addWatchFile()"] 31d5b2c5_2267_3dde_fc85_e309cf15eb0d -->|calls| 95b612c4_17dd_1e1e_8054_97e69290edb4 0a6fbb70_77d3_9873_8417_b1e4ffba2651["ensureWatchedFile()"] 31d5b2c5_2267_3dde_fc85_e309cf15eb0d -->|calls| 0a6fbb70_77d3_9873_8417_b1e4ffba2651 style 31d5b2c5_2267_3dde_fc85_e309cf15eb0d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/vite/src/node/server/pluginContainer.ts lines 861–869
addWatchFile(id: string): void {
this._container.watchFiles.add(id)
if (this._container.watcher)
ensureWatchedFile(
this._container.watcher,
id,
this.environment.config.root,
)
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does addWatchFile() do?
addWatchFile() is a function in the vite codebase, defined in packages/vite/src/node/server/pluginContainer.ts.
Where is addWatchFile() defined?
addWatchFile() is defined in packages/vite/src/node/server/pluginContainer.ts at line 861.
What does addWatchFile() call?
addWatchFile() calls 2 function(s): addWatchFile, ensureWatchedFile.
What calls addWatchFile()?
addWatchFile() is called by 2 function(s): addWatchFile, cssPlugin.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free