(port: number, host = "127.0.0.1")
| 287 | // `host` is the loopback the server actually bound (Vite binds `[::1]`, embedded |
| 288 | // binds `127.0.0.1`); default to IPv4 for the embedded/legacy callers. |
| 289 | function previewBaseUrl(port: number, host = "127.0.0.1"): string { |
| 290 | return `http://${host}:${port}`; |
| 291 | } |
| 292 | |
| 293 | function absolutePreviewUrl(port: number, path: string, host = "127.0.0.1"): string { |
| 294 | if (/^https?:\/\//.test(path)) return path; |
no outgoing calls
no test coverage detected