Skip to content

Commit 10ba2bd

Browse files
authored
Enable vite dev server debug log #5335
#5335
2 parents fe42ba1 + 3a8424a commit 10ba2bd

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

nginx.conf

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ http {
3232
'' close;
3333
}
3434

35+
map $http_upgrade $vite_connection_upgrade {
36+
default upgrade;
37+
# It seems that Vite dev server has problem when requests are with Connection: close
38+
'' '';
39+
}
40+
3541
client_max_body_size 10M;
3642

3743
server {
@@ -91,7 +97,7 @@ http {
9197
proxy_http_version 1.1;
9298
proxy_set_header Host $http_host;
9399
proxy_set_header Upgrade $http_upgrade;
94-
proxy_set_header Connection $connection_upgrade;
100+
proxy_set_header Connection $vite_connection_upgrade;
95101
}
96102

97103
location ~ ^/api {
@@ -113,7 +119,7 @@ http {
113119
proxy_http_version 1.1;
114120
proxy_set_header Host $http_host;
115121
proxy_set_header Upgrade $http_upgrade;
116-
proxy_set_header Connection $connection_upgrade;
122+
proxy_set_header Connection $vite_connection_upgrade;
117123
}
118124

119125
location ~ ^/api {

portal/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"scripts": {
99
"postinstall": "./scripts/npm-postinstall.sh",
1010
"test": "jest",
11-
"start": "vite",
11+
"start": "vite --debug",
1212
"build": "vite build",
1313
"clean": "rm -rf ./dist/ && mkdir ./dist/ && touch ./dist/.gitkeep",
1414
"typecheck": "tsc",

0 commit comments

Comments
 (0)