htmlFileToUrl() — vite Function Reference
Architecture documentation for the htmlFileToUrl() function in warmup.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD 88bc01ae_f434_ebd6_6f84_27d3ae6f3a72["htmlFileToUrl()"] c4f5fac4_8500_5acd_037b_a0062bdbd152["warmup.ts"] 88bc01ae_f434_ebd6_6f84_27d3ae6f3a72 -->|defined in| c4f5fac4_8500_5acd_037b_a0062bdbd152 8b9f9995_7f45_8a00_527d_191c9038ff89["warmupFile()"] 8b9f9995_7f45_8a00_527d_191c9038ff89 -->|calls| 88bc01ae_f434_ebd6_6f84_27d3ae6f3a72 a4adb1a7_cf54_091f_eb63_8217e684a8e1["normalizePath()"] 88bc01ae_f434_ebd6_6f84_27d3ae6f3a72 -->|calls| a4adb1a7_cf54_091f_eb63_8217e684a8e1 style 88bc01ae_f434_ebd6_6f84_27d3ae6f3a72 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/vite/src/node/server/warmup.ts lines 55–61
function htmlFileToUrl(file: string, root: string) {
const url = path.relative(root, file)
// out of root, ignore file
if (url[0] === '.') return
// file within root, create root-relative url
return '/' + normalizePath(url)
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does htmlFileToUrl() do?
htmlFileToUrl() is a function in the vite codebase, defined in packages/vite/src/node/server/warmup.ts.
Where is htmlFileToUrl() defined?
htmlFileToUrl() is defined in packages/vite/src/node/server/warmup.ts at line 55.
What does htmlFileToUrl() call?
htmlFileToUrl() calls 1 function(s): normalizePath.
What calls htmlFileToUrl()?
htmlFileToUrl() is called by 1 function(s): warmupFile.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free