I have problem with using proxy when I am trying to run production version of my application. When I use proxy with vite command (development command to start Vite project), It works without problems. I can change target URL and it works. But when I build project with vite build and then run with serve -s dist, It doesnt work.
When I try this with dev script (code), everything works.. I can even change URL with ENV variable and then my frontend using another backend (I have 2 backends live to debug this). It only doesnt work in production mode with command serve -s dist. Any ideas?
I also noticed, that when I change baseUrl in axios config, it works with this url.. so It is something with proxy and production version..
EDIT: I noticed, that requests to that URL ending up with status code 200 OK, but the preview tab in google dev tools is white screen..