Home / Function/ areSeparateFolders() — vite Function Reference

areSeparateFolders() — vite Function Reference

Architecture documentation for the areSeparateFolders() function in prepareOutDir.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  6c8076cd_ccbd_1423_ce70_db93911678f5["areSeparateFolders()"]
  4c658b37_85c2_95c4_7b25_9e1e2258e2a4["prepareOutDir.ts"]
  6c8076cd_ccbd_1423_ce70_db93911678f5 -->|defined in| 4c658b37_85c2_95c4_7b25_9e1e2258e2a4
  3751e751_4133_da1f_af25_4267e85adc15["prepareOutDir()"]
  3751e751_4133_da1f_af25_4267e85adc15 -->|calls| 6c8076cd_ccbd_1423_ce70_db93911678f5
  a4adb1a7_cf54_091f_eb63_8217e684a8e1["normalizePath()"]
  6c8076cd_ccbd_1423_ce70_db93911678f5 -->|calls| a4adb1a7_cf54_091f_eb63_8217e684a8e1
  1a3bec7b_1a11_316f_5831_a0535b829bbf["withTrailingSlash()"]
  6c8076cd_ccbd_1423_ce70_db93911678f5 -->|calls| 1a3bec7b_1a11_316f_5831_a0535b829bbf
  style 6c8076cd_ccbd_1423_ce70_db93911678f5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/plugins/prepareOutDir.ts lines 94–102

function areSeparateFolders(a: string, b: string) {
  const na = normalizePath(a)
  const nb = normalizePath(b)
  return (
    na !== nb &&
    !na.startsWith(withTrailingSlash(nb)) &&
    !nb.startsWith(withTrailingSlash(na))
  )
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does areSeparateFolders() do?
areSeparateFolders() is a function in the vite codebase, defined in packages/vite/src/node/plugins/prepareOutDir.ts.
Where is areSeparateFolders() defined?
areSeparateFolders() is defined in packages/vite/src/node/plugins/prepareOutDir.ts at line 94.
What does areSeparateFolders() call?
areSeparateFolders() calls 2 function(s): normalizePath, withTrailingSlash.
What calls areSeparateFolders()?
areSeparateFolders() is called by 1 function(s): prepareOutDir.

Analyze Your Own Codebase

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

Try Supermodel Free