File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 {
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 {
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments