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

Function readFile

playground/test-utils.ts:159–165  ·  view source on GitHub ↗
(
  filename: string,
  encoding?: BufferEncoding | null,
)

Source from the content-addressed store, hash-verified

157export function readFile(filename: string, encoding?: BufferEncoding): string
158export function readFile(filename: string, encoding: null): Buffer
159export function readFile(
160 filename: string,
161 encoding?: BufferEncoding | null,
162): Buffer | string {
163 if (encoding === undefined) encoding = 'utf-8'
164 return fs.readFileSync(path.resolve(testDir, filename), encoding)
165}
166
167export function editFile(
168 filename: string,

Callers 13

instantiateFromFileFunction · 0.85
mergeChangelog.tsFile · 0.85
legacy.spec.tsFile · 0.85
minify.spec.tsFile · 0.85
assets.spec.tsFile · 0.85
lib.spec.tsFile · 0.85
hmr-ssr.spec.tsFile · 0.85

Calls 1

resolveMethod · 0.65

Tested by

no test coverage detected