From 1a3b1d73d7babdab6a52a5fb1ef193fd63666877 Mon Sep 17 00:00:00 2001 From: ferdisap <100170686+ferdisap@users.noreply.github.com> Date: Tue, 19 Mar 2024 14:59:17 +0700 Subject: [PATCH] fix: update client.ts@cleanUrl to accomodate blob protocol (#16182) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 翠 / green --- packages/vite/src/client/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite/src/client/client.ts b/packages/vite/src/client/client.ts index 45c123213c5446..38b632cb945b57 100644 --- a/packages/vite/src/client/client.ts +++ b/packages/vite/src/client/client.ts @@ -111,7 +111,7 @@ function setupWebSocket( } function cleanUrl(pathname: string): string { - const url = new URL(pathname, location.toString()) + const url = new URL(pathname, 'http://vitejs.dev') url.searchParams.delete('direct') return url.pathname + url.search }