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

Function getFileUrlFromFullPath

packages/vite/src/node/build.ts:1573–1574  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

1571 )
1572
1573const getFileUrlFromFullPath = (path: string) =>
1574 `require('u' + 'rl').pathToFileURL(${path}).href`
1575
1576const getFileUrlFromRelativePath = (path: string) =>
1577 getFileUrlFromFullPath(`__dirname + '/${escapeId(path)}'`)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected