Home / Type/ EnvironmentResolveOptions Type — vite Architecture

EnvironmentResolveOptions Type — vite Architecture

Architecture documentation for the EnvironmentResolveOptions type/interface in resolve.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  1c5f5e3b_b170_b688_e881_9e6f40e93601["EnvironmentResolveOptions"]
  dcff87b0_a8ea_57a2_3b29_a7b8f19986f3["resolve.ts"]
  1c5f5e3b_b170_b688_e881_9e6f40e93601 -->|defined in| dcff87b0_a8ea_57a2_3b29_a7b8f19986f3
  style 1c5f5e3b_b170_b688_e881_9e6f40e93601 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/plugins/resolve.ts lines 76–105

export interface EnvironmentResolveOptions {
  /**
   * @default ['browser', 'module', 'jsnext:main', 'jsnext']
   */
  mainFields?: string[]
  conditions?: string[]
  externalConditions?: string[]
  /**
   * @default ['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']
   */
  extensions?: string[]
  dedupe?: string[]
  // TODO: better abstraction that works for the client environment too?
  /**
   * Prevent listed dependencies from being externalized and will get bundled in build.
   * Only works in server environments for now. Previously this was `ssr.noExternal`.
   * @experimental
   */
  noExternal?: string | RegExp | (string | RegExp)[] | true
  /**
   * Externalize the given dependencies and their transitive dependencies.
   * Only works in server environments for now. Previously this was `ssr.external`.
   * @experimental
   */
  external?: string[] | true
  /**
   * Array of strings or regular expressions that indicate what modules are builtin for the environment.
   */
  builtins?: (string | RegExp)[]
}

Frequently Asked Questions

What is the EnvironmentResolveOptions type?
EnvironmentResolveOptions is a type/interface in the vite codebase, defined in packages/vite/src/node/plugins/resolve.ts.
Where is EnvironmentResolveOptions defined?
EnvironmentResolveOptions is defined in packages/vite/src/node/plugins/resolve.ts at line 76.

Analyze Your Own Codebase

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

Try Supermodel Free