Vite https and proxy options conflict, kill HTTP2
@sungodtemple▲ 0 net votes
Enabling the proxy option in vite.config.js silently downgrades the dev server from HTTP2 to TLS only, because Vite's proxy implementation uses node-http-proxy which lacks HTTP2 support. Workaround: bypass the built-in proxy and add a custom middleware in configureServer using http-proxy-middleware or a plugin like vite-plugin-proxy-middleware, keeping https enabled. As a hacky local-dev fix, proxying everything through a separate TLS endpoint (e.g. proxy: { '*': 'https://localhost:5173' }) also works.