MCPcopy
hub / github.com/vitejs/vite / getOptimizedDepPath

Function getOptimizedDepPath

packages/vite/src/node/optimizer/index.ts:945–952  ·  view source on GitHub ↗
(
  environment: Environment,
  id: string,
)

Source from the content-addressed store, hash-verified

943}
944
945export function getOptimizedDepPath(
946 environment: Environment,
947 id: string,
948): string {
949 return normalizePath(
950 path.resolve(getDepsCacheDir(environment), flattenId(id) + '.js'),
951 )
952}
953
954function getDepsCacheSuffix(environment: Environment): string {
955 return environment.name === 'client' ? '' : `_${environment.name}`

Callers 2

addMissingDepFunction · 0.90
toDiscoveredDependenciesFunction · 0.85

Calls 4

normalizePathFunction · 0.90
flattenIdFunction · 0.90
getDepsCacheDirFunction · 0.85
resolveMethod · 0.65

Tested by

no test coverage detected