Home / Type/ ModuleRunnerOptions Type — vite Architecture

ModuleRunnerOptions Type — vite Architecture

Architecture documentation for the ModuleRunnerOptions type/interface in types.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  e3629e32_ea56_4a5b_8dbe_52b8ca9dbc80["ModuleRunnerOptions"]
  bf48f7e9_65f6_54c3_7dce_f44769180bd7["types.ts"]
  e3629e32_ea56_4a5b_8dbe_52b8ca9dbc80 -->|defined in| bf48f7e9_65f6_54c3_7dce_f44769180bd7
  style e3629e32_ea56_4a5b_8dbe_52b8ca9dbc80 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/module-runner/types.ts lines 87–120

export interface ModuleRunnerOptions {
  /**
   * A set of methods to communicate with the server.
   */
  transport: ModuleRunnerTransport
  /**
   * Configure how source maps are resolved. Prefers `node` if `process.setSourceMapsEnabled` is available.
   * Otherwise it will use `prepareStackTrace` by default which overrides `Error.prepareStackTrace` method.
   * You can provide an object to configure how file contents and source maps are resolved for files that were not processed by Vite.
   */
  sourcemapInterceptor?:
    | false
    | 'node'
    | 'prepareStackTrace'
    | InterceptorOptions
  /**
   * Disable HMR or configure HMR options.
   *
   * @default true
   */
  hmr?: boolean | ModuleRunnerHmr
  /**
   * Create import.meta object for the module.
   *
   * @default createDefaultImportMeta
   */
  createImportMeta?: (
    modulePath: string,
  ) => ModuleRunnerImportMeta | Promise<ModuleRunnerImportMeta>
  /**
   * Custom module cache. If not provided, creates a separate module cache for each ModuleRunner instance.
   */
  evaluatedModules?: EvaluatedModules
}

Frequently Asked Questions

What is the ModuleRunnerOptions type?
ModuleRunnerOptions is a type/interface in the vite codebase, defined in packages/vite/src/module-runner/types.ts.
Where is ModuleRunnerOptions defined?
ModuleRunnerOptions is defined in packages/vite/src/module-runner/types.ts at line 87.

Analyze Your Own Codebase

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

Try Supermodel Free