Closed marc3lsk closed 2 years ago
I was able to fix this issue by adjusting the vite config and startup script https://github.com/marc3lsk/AspNetReactViteSpaYarp/commit/3a4dc4580dfecedbf6a4a51c40b348b03b36f3a4
I figured it out thanks to this article https://blogs.taiga.nl/martijn/2021/02/24/integrating-vite-with-asp-net-core-a-winning-combination/
Thanks for sharing @marc3lsk! If you want, I can create a samples section in the readme and link to your repo.
No problem! I don't mind if you would like to use my repo as an example.
https://github.com/marc3lsk/AspNetReactViteSpaYarp
In this repo I tried to make my client app with vite+react. When I run the dotnet app and navigate to its URL I can see my react app but it keeps reloading periodically. It seems that connection to vite WebSocket localhost:3000 is not working. How could this be fixed?