Home / Type/ LegacyOptions Type — vite Architecture

LegacyOptions Type — vite Architecture

Architecture documentation for the LegacyOptions type/interface in config.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  09629620_f590_086e_cde0_1f88a0847a12["LegacyOptions"]
  7da774f9_eca5_d54e_6e01_6bee7d460a2b["config.ts"]
  09629620_f590_086e_cde0_1f88a0847a12 -->|defined in| 7da774f9_eca5_d54e_6e01_6bee7d460a2b
  style 09629620_f590_086e_cde0_1f88a0847a12 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/config.ts lines 590–614

export interface LegacyOptions {
  /**
   * In Vite 6.0.8 and below, WebSocket server was able to connect from any web pages. However,
   * that could be exploited by a malicious web page.
   *
   * In Vite 6.0.9+, the WebSocket server now requires a token to connect from a web page.
   * But this may break some plugins and frameworks that connects to the WebSocket server
   * on their own. Enabling this option will make Vite skip the token check.
   *
   * **We do not recommend enabling this option unless you are sure that you are fine with
   * that security weakness.**
   */
  skipWebSocketTokenCheck?: boolean
  /**
   * Opt-in to the pre-Vite 8 CJS interop behavior, which was inconsistent.
   *
   * In pre-Vite 8 versions, Vite had inconsistent CJS interop behavior. This was due to
   * the different behavior of esbuild and the Rollup commonjs plugin.
   * Vite 8+ uses Rolldown for both the dependency optimization in dev and the production build,
   * which aligns the behavior to esbuild.
   *
   * See the Vite 8 migration guide for more details.
   */
  inconsistentCjsInterop?: boolean
}

Frequently Asked Questions

What is the LegacyOptions type?
LegacyOptions is a type/interface in the vite codebase, defined in packages/vite/src/node/config.ts.
Where is LegacyOptions defined?
LegacyOptions is defined in packages/vite/src/node/config.ts at line 590.

Analyze Your Own Codebase

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

Try Supermodel Free