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

Function toOutputFilePath

packages/vite/src/node/plugins/html.ts:910–926  ·  view source on GitHub ↗
(
          filename: string,
          type: 'asset' | 'public',
        )

Source from the content-addressed store, hash-verified

908 )
909 const assetsBase = getBaseInHTML(relativeUrlPath, config)
910 const toOutputFilePath = (
911 filename: string,
912 type: 'asset' | 'public',
913 ) => {
914 if (isExternalUrl(filename)) {
915 return filename
916 } else {
917 return toOutputFilePathInHtml(
918 filename,
919 type,
920 relativeUrlPath,
921 'html',
922 config,
923 (filename) => assetsBase + filename,
924 )
925 }
926 }
927
928 const toOutputAssetFilePath = (filename: string) =>
929 toOutputFilePath(filename, 'asset')

Callers 2

toOutputAssetFilePathFunction · 0.85

Calls 2

isExternalUrlFunction · 0.90
toOutputFilePathInHtmlFunction · 0.85

Tested by

no test coverage detected