Home / Function/ shouldExternalizeDep() — vite Function Reference

shouldExternalizeDep() — vite Function Reference

Architecture documentation for the shouldExternalizeDep() function in scan.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  67dc5388_0a8f_7b39_e3da_79bf8a3ed488["shouldExternalizeDep()"]
  6c7a7f5e_5d30_3576_49bf_9041362fd3fd["scan.ts"]
  67dc5388_0a8f_7b39_e3da_79bf8a3ed488 -->|defined in| 6c7a7f5e_5d30_3576_49bf_9041362fd3fd
  01ea698c_723c_af06_e469_c7d7c469b6bb["rolldownScanPlugin()"]
  01ea698c_723c_af06_e469_c7d7c469b6bb -->|calls| 67dc5388_0a8f_7b39_e3da_79bf8a3ed488
  style 67dc5388_0a8f_7b39_e3da_79bf8a3ed488 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/optimizer/scan.ts lines 741–751

function shouldExternalizeDep(resolvedId: string, rawId: string): boolean {
  // not a valid file path
  if (!path.isAbsolute(resolvedId)) {
    return true
  }
  // virtual id
  if (resolvedId === rawId || resolvedId.includes('\0')) {
    return true
  }
  return false
}

Subdomains

Frequently Asked Questions

What does shouldExternalizeDep() do?
shouldExternalizeDep() is a function in the vite codebase, defined in packages/vite/src/node/optimizer/scan.ts.
Where is shouldExternalizeDep() defined?
shouldExternalizeDep() is defined in packages/vite/src/node/optimizer/scan.ts at line 741.
What calls shouldExternalizeDep()?
shouldExternalizeDep() is called by 1 function(s): rolldownScanPlugin.

Analyze Your Own Codebase

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

Try Supermodel Free