File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -128,8 +128,8 @@ interface ViteDevServer {
128128 */
129129 moduleGraph : ModuleGraph
130130 /**
131- * The resolved urls Vite prints on the CLI. null in middleware mode or
132- * before ` server.listen` is called .
131+ * The resolved urls Vite prints on the CLI (URL-encoded). Returns `null`
132+ * in middleware mode or if the server is not listening on any port .
133133 */
134134 resolvedUrls : ResolvedServerUrls | null
135135 /**
@@ -274,8 +274,8 @@ interface PreviewServer {
274274 */
275275 httpServer: http.Server
276276 /**
277- * The resolved urls Vite prints on the CLI.
278- * null before server is listening.
277+ * The resolved urls Vite prints on the CLI (URL-encoded). Returns ` null `
278+ * if the server is not listening on any port .
279279 */
280280 resolvedUrls: ResolvedServerUrls | null
281281 /**
Original file line number Diff line number Diff line change @@ -84,8 +84,8 @@ export interface PreviewServer {
8484 */
8585 httpServer : HttpServer
8686 /**
87- * The resolved urls Vite prints on the CLI.
88- * null before server is listening.
87+ * The resolved urls Vite prints on the CLI (URL-encoded). Returns `null`
88+ * if the server is not listening on any port .
8989 */
9090 resolvedUrls : ResolvedServerUrls | null
9191 /**
@@ -154,6 +154,7 @@ export async function preview(
154154 async close ( ) {
155155 teardownSIGTERMListener ( closeServerAndExit )
156156 await closeHttpServer ( )
157+ server . resolvedUrls = null
157158 } ,
158159 resolvedUrls : null ,
159160 printUrls ( ) {
Original file line number Diff line number Diff line change @@ -284,8 +284,8 @@ export interface ViteDevServer {
284284 */
285285 moduleGraph : ModuleGraph
286286 /**
287- * The resolved urls Vite prints on the CLI. null in middleware mode or
288- * before ` server.listen` is called .
287+ * The resolved urls Vite prints on the CLI (URL-encoded). Returns `null`
288+ * in middleware mode or if the server is not listening on any port .
289289 */
290290 resolvedUrls : ResolvedServerUrls | null
291291 /**
You can’t perform that action at this time.
0 commit comments