Skip to content

Commit c98d1af

Browse files
authored
Automatically disable http2 when Vite proxy is used (#571)
1 parent 0ffed55 commit c98d1af

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/silver-elephants-hug.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ladle/react": patch
3+
---
4+
5+
Automatically disable http2 when Vite proxy is used

packages/ladle/lib/cli/vite-dev.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ const bundler = async (config, configFolder) => {
132132
};
133133

134134
if (useHttps) {
135-
if (config.disableHttp2) {
135+
const usesProxy = Boolean(vite.config.server.proxy);
136+
137+
if (config.disableHttp2 || usesProxy) {
136138
https
137139
.createServer({ ...vite.config.server.https }, app.callback())
138140
.listen(port, hostname, listenCallback);

0 commit comments

Comments
 (0)