From 8b776d8f356060cdce7e3d15b263377ed1488e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Tue, 26 Nov 2024 19:02:25 +0100 Subject: [PATCH 1/3] fix(vite): default empty server `proxy` prevents starting http2 server --- packages/vite/src/node/server/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/vite/src/node/server/index.ts b/packages/vite/src/node/server/index.ts index 34a0b5b6a080c4..68b6bea609d2ad 100644 --- a/packages/vite/src/node/server/index.ts +++ b/packages/vite/src/node/server/index.ts @@ -1022,7 +1022,6 @@ export const serverConfigDefaults = Object.freeze({ host: 'localhost', https: undefined, open: false, - proxy: {}, cors: true, headers: {}, // hmr From 1850b1045c7be437bcd10ebd6984934e53e6c865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Wed, 27 Nov 2024 11:52:24 +0900 Subject: [PATCH 2/3] chore: add comment --- packages/vite/src/node/server/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/vite/src/node/server/index.ts b/packages/vite/src/node/server/index.ts index 68b6bea609d2ad..e84547d5c36e5c 100644 --- a/packages/vite/src/node/server/index.ts +++ b/packages/vite/src/node/server/index.ts @@ -1022,6 +1022,7 @@ export const serverConfigDefaults = Object.freeze({ host: 'localhost', https: undefined, open: false, + // proxy cors: true, headers: {}, // hmr From 2ce08202c43f50e318377eec46ea102aea920fd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Wed, 27 Nov 2024 11:59:52 +0900 Subject: [PATCH 3/3] chore: use undefined --- packages/vite/src/node/server/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite/src/node/server/index.ts b/packages/vite/src/node/server/index.ts index e84547d5c36e5c..772b163a745eb7 100644 --- a/packages/vite/src/node/server/index.ts +++ b/packages/vite/src/node/server/index.ts @@ -1022,7 +1022,7 @@ export const serverConfigDefaults = Object.freeze({ host: 'localhost', https: undefined, open: false, - // proxy + proxy: undefined, cors: true, headers: {}, // hmr