Home / Function/ isScannable() — vite Function Reference

isScannable() — vite Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

packages/vite/src/node/optimizer/scan.ts lines 753–760

function isScannable(id: string, extensions: string[] | undefined): boolean {
  return (
    JS_TYPES_RE.test(id) ||
    htmlTypesRE.test(id) ||
    extensions?.includes(path.extname(id)) ||
    false
  )
}

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free