Home / Function/ _getEnvironment() — vite Function Reference

_getEnvironment() — vite Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  4157452b_1286_c3e8_9e8a_c702bce01b69["_getEnvironment()"]
  e095f407_f809_eb3e_608e_d152e6847d0a["PluginContainer"]
  4157452b_1286_c3e8_9e8a_c702bce01b69 -->|defined in| e095f407_f809_eb3e_608e_d152e6847d0a
  bdc17ca5_0ac7_3179_22ec_ade8f3ccd777["_getPluginContainer()"]
  bdc17ca5_0ac7_3179_22ec_ade8f3ccd777 -->|calls| 4157452b_1286_c3e8_9e8a_c702bce01b69
  style 4157452b_1286_c3e8_9e8a_c702bce01b69 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/server/pluginContainer.ts lines 1188–1195

  private _getEnvironment(options?: {
    ssr?: boolean
    environment?: Environment
  }) {
    return options?.environment
      ? options.environment
      : this.environments[options?.ssr ? 'ssr' : 'client']
  }

Domain

Subdomains

Frequently Asked Questions

What does _getEnvironment() do?
_getEnvironment() is a function in the vite codebase, defined in packages/vite/src/node/server/pluginContainer.ts.
Where is _getEnvironment() defined?
_getEnvironment() is defined in packages/vite/src/node/server/pluginContainer.ts at line 1188.
What calls _getEnvironment()?
_getEnvironment() is called by 1 function(s): _getPluginContainer.

Analyze Your Own Codebase

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

Try Supermodel Free