printServerUrls() — vite Function Reference
Architecture documentation for the printServerUrls() function in logger.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD 3ec61957_fda2_ba92_4de6_372b0e9ebba3["printServerUrls()"] eca93de5_04d5_dda0_7ae6_2ceb5379ea81["logger.ts"] 3ec61957_fda2_ba92_4de6_372b0e9ebba3 -->|defined in| eca93de5_04d5_dda0_7ae6_2ceb5379ea81 5c50110b_5c76_c14f_b1dd_3efd3df7f375["preview()"] 5c50110b_5c76_c14f_b1dd_3efd3df7f375 -->|calls| 3ec61957_fda2_ba92_4de6_372b0e9ebba3 24ecf2a1_3c09_d451_76f3_9485b4e993f8["_createServer()"] 24ecf2a1_3c09_d451_76f3_9485b4e993f8 -->|calls| 3ec61957_fda2_ba92_4de6_372b0e9ebba3 style 3ec61957_fda2_ba92_4de6_372b0e9ebba3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/vite/src/node/logger.ts lines 168–188
export function printServerUrls(
urls: ResolvedServerUrls,
optionsHost: string | boolean | undefined,
info: Logger['info'],
): void {
const colorUrl = (url: string) =>
colors.cyan(url.replace(/:(\d+)\//, (_, port) => `:${colors.bold(port)}/`))
for (const url of urls.local) {
info(` ${colors.green('➜')} ${colors.bold('Local')}: ${colorUrl(url)}`)
}
for (const url of urls.network) {
info(` ${colors.green('➜')} ${colors.bold('Network')}: ${colorUrl(url)}`)
}
if (urls.network.length === 0 && optionsHost === undefined) {
info(
colors.dim(` ${colors.green('➜')} ${colors.bold('Network')}: use `) +
colors.bold('--host') +
colors.dim(' to expose'),
)
}
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does printServerUrls() do?
printServerUrls() is a function in the vite codebase, defined in packages/vite/src/node/logger.ts.
Where is printServerUrls() defined?
printServerUrls() is defined in packages/vite/src/node/logger.ts at line 168.
What calls printServerUrls()?
printServerUrls() is called by 2 function(s): _createServer, preview.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free