From d9ae1b2e573e8e5e313c1f23a5a0b5d6d9dff887 Mon Sep 17 00:00:00 2001 From: Senao <48955231+XiSenao@users.noreply.github.com> Date: Fri, 15 Dec 2023 23:30:13 +0800 Subject: [PATCH] fix: omit protocol does not require pre-transform (#15355) --- packages/vite/src/node/server/middlewares/indexHtml.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite/src/node/server/middlewares/indexHtml.ts b/packages/vite/src/node/server/middlewares/indexHtml.ts index 4ebc2a41e86bfe..d7422667794133 100644 --- a/packages/vite/src/node/server/middlewares/indexHtml.ts +++ b/packages/vite/src/node/server/middlewares/indexHtml.ts @@ -157,7 +157,7 @@ const processNodeUrl = ( if (server && shouldPreTransform(url, config)) { let preTransformUrl: string | undefined - if (url[0] === '/') { + if (url[0] === '/' && url[1] !== '/') { preTransformUrl = url } else if (url[0] === '.' || isBareRelative(url)) { preTransformUrl = path.posix.join(