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

Function tryResolveRealFile

packages/vite/src/node/plugins/resolve.ts:1145–1151  ·  view source on GitHub ↗
(
  file: string,
  preserveSymlinks?: boolean,
)

Source from the content-addressed store, hash-verified

1143}
1144
1145function tryResolveRealFile(
1146 file: string,
1147 preserveSymlinks?: boolean,
1148): string | undefined {
1149 const stat = tryStatSync(file)
1150 if (stat?.isFile()) return getRealPath(file, preserveSymlinks)
1151}
1152
1153function tryResolveRealFileWithExtensions(
1154 filePath: string,

Callers 2

tryCleanFsResolveFunction · 0.85

Calls 2

tryStatSyncFunction · 0.90
getRealPathFunction · 0.85

Tested by

no test coverage detected