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

Function getShortName

packages/vite/src/node/server/hmr.ts:153–157  ·  view source on GitHub ↗
(file: string, root: string)

Source from the content-addressed store, hash-verified

151}
152
153export function getShortName(file: string, root: string): string {
154 return file.startsWith(withTrailingSlash(root))
155 ? path.posix.relative(root, file)
156 : file
157}
158
159export interface NormalizedHotChannelClient {
160 /**

Callers 3

handleHmrOutputMethod · 0.90
invalidateModuleMethod · 0.90
handleHMRUpdateFunction · 0.85

Calls 1

withTrailingSlashFunction · 0.90

Tested by

no test coverage detected