Home / Function/ processImport() — vite Function Reference

processImport() — vite Function Reference

Architecture documentation for the processImport() function in runner.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  5545fcba_59d0_ba73_89b7_11f4c41391bd["processImport()"]
  1d3ff778_7ac6_0038_640f_997e968c3c8f["ModuleRunner"]
  5545fcba_59d0_ba73_89b7_11f4c41391bd -->|defined in| 1d3ff778_7ac6_0038_640f_997e968c3c8f
  80e2d448_2bda_f3ef_d790_a8b2d8bcb44e["cachedRequest()"]
  80e2d448_2bda_f3ef_d790_a8b2d8bcb44e -->|calls| 5545fcba_59d0_ba73_89b7_11f4c41391bd
  0d6c59ba_8e92_3008_e3b8_8fe33b44bf4c["analyzeImportedModDifference()"]
  5545fcba_59d0_ba73_89b7_11f4c41391bd -->|calls| 0d6c59ba_8e92_3008_e3b8_8fe33b44bf4c
  style 5545fcba_59d0_ba73_89b7_11f4c41391bd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/module-runner/runner.ts lines 122–134

  private processImport(
    exports: Record<string, any>,
    fetchResult: ResolvedResult,
    metadata?: SSRImportMetadata,
  ) {
    if (!('externalize' in fetchResult)) {
      return exports
    }
    const { url, type } = fetchResult
    if (type !== 'module' && type !== 'commonjs') return exports
    analyzeImportedModDifference(exports, url, type, metadata)
    return exports
  }

Domain

Subdomains

Called By

Frequently Asked Questions

What does processImport() do?
processImport() is a function in the vite codebase, defined in packages/vite/src/module-runner/runner.ts.
Where is processImport() defined?
processImport() is defined in packages/vite/src/module-runner/runner.ts at line 122.
What does processImport() call?
processImport() calls 1 function(s): analyzeImportedModDifference.
What calls processImport()?
processImport() is called by 1 function(s): cachedRequest.

Analyze Your Own Codebase

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

Try Supermodel Free