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

Function wrapId

packages/vite/src/shared/utils.ts:11–15  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

9 * import specifiers by the importAnalysis plugin.
10 */
11export function wrapId(id: string): string {
12 return id.startsWith(VALID_ID_PREFIX)
13 ? id
14 : VALID_ID_PREFIX + id.replace('\0', NULL_BYTE_PLACEHOLDER)
15}
16
17/**
18 * Undo {@link wrapId}'s `/@id/` and null byte replacements.

Callers 4

normalizeHmrUrlFunction · 0.90
devHtmlHookFunction · 0.90
normalizeResolvedIdToUrlFunction · 0.90
transformFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected