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

Function getFileStartIndex

packages/vite/src/node/utils.ts:1913–1915  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

1911
1912// find the start of the file, after the hashbang
1913export function getFileStartIndex(code: string): number {
1914 return hashbangRE.exec(code)?.[0].length ?? 0
1915}

Callers 2

ssrTransformScriptFunction · 0.90
interopNamedImportsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected