Home / Function/ _getPluginContext() — vite Function Reference

_getPluginContext() — vite Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  5551e407_98e1_a15d_289d_2913c0ed600b["_getPluginContext()"]
  285b1044_dd20_6f59_7cf5_0ad094eeacee["EnvironmentPluginContainer"]
  5551e407_98e1_a15d_289d_2913c0ed600b -->|defined in| 285b1044_dd20_6f59_7cf5_0ad094eeacee
  4037a852_6412_11ad_da74_ea3d0ff0c661["buildStart()"]
  4037a852_6412_11ad_da74_ea3d0ff0c661 -->|calls| 5551e407_98e1_a15d_289d_2913c0ed600b
  1792884e_1fbb_9081_6a8c_f0356bfb1682["watchChange()"]
  1792884e_1fbb_9081_6a8c_f0356bfb1682 -->|calls| 5551e407_98e1_a15d_289d_2913c0ed600b
  562e9e2b_e379_c47c_c40f_7b7850f80d38["close()"]
  562e9e2b_e379_c47c_c40f_7b7850f80d38 -->|calls| 5551e407_98e1_a15d_289d_2913c0ed600b
  style 5551e407_98e1_a15d_289d_2913c0ed600b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/server/pluginContainer.ts lines 296–301

  private _getPluginContext(plugin: Plugin) {
    if (!this._pluginContextMap.has(plugin)) {
      this._pluginContextMap.set(plugin, new PluginContext(plugin, this))
    }
    return this._pluginContextMap.get(plugin)!
  }

Domain

Subdomains

Frequently Asked Questions

What does _getPluginContext() do?
_getPluginContext() is a function in the vite codebase, defined in packages/vite/src/node/server/pluginContainer.ts.
Where is _getPluginContext() defined?
_getPluginContext() is defined in packages/vite/src/node/server/pluginContainer.ts at line 296.
What calls _getPluginContext()?
_getPluginContext() is called by 3 function(s): buildStart, close, watchChange.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free