Home / Function/ addWatchFile() — vite Function Reference

addWatchFile() — vite Function Reference

Architecture documentation for the addWatchFile() function in pluginContainer.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  95b612c4_17dd_1e1e_8054_97e69290edb4["addWatchFile()"]
  1b2c7746_37b9_b12d_6e81_0da84b2005cb["LoadPluginContext"]
  95b612c4_17dd_1e1e_8054_97e69290edb4 -->|defined in| 1b2c7746_37b9_b12d_6e81_0da84b2005cb
  31d5b2c5_2267_3dde_fc85_e309cf15eb0d["addWatchFile()"]
  31d5b2c5_2267_3dde_fc85_e309cf15eb0d -->|calls| 95b612c4_17dd_1e1e_8054_97e69290edb4
  157cb972_609e_022e_1ec5_3ed6f7e4f45c["cssPlugin()"]
  157cb972_609e_022e_1ec5_3ed6f7e4f45c -->|calls| 95b612c4_17dd_1e1e_8054_97e69290edb4
  31d5b2c5_2267_3dde_fc85_e309cf15eb0d["addWatchFile()"]
  95b612c4_17dd_1e1e_8054_97e69290edb4 -->|calls| 31d5b2c5_2267_3dde_fc85_e309cf15eb0d
  style 95b612c4_17dd_1e1e_8054_97e69290edb4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/server/pluginContainer.ts lines 1054–1060

  override addWatchFile(id: string): void {
    if (!this._addedImports) {
      this._addedImports = new Set()
    }
    this._addedImports.add(id)
    super.addWatchFile(id)
  }

Domain

Subdomains

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 1054.
What does addWatchFile() call?
addWatchFile() calls 1 function(s): addWatchFile.
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