R
Railway•11mo ago
alfonsotrocoli

Just deployed a Vite+React app and image is still the first one I deployed

Hi! I am deploying a Vite+React app and even though everything is being deployed great. Since I deployed the first version, when I am doing merges on master branch, I see a new deployment on the railway app, but I don't see the changes on the generated domain from railway. Project ID: 8a00778f-e3c5-48a6-a9d1-5b5716aa6183 Service ID: 99e05b4b-3d83-43c6-a2a6-45e28f491164
No description
Solution:
vite didn’t generate the cache busting file hashes because youre running a dev server on railway, besides the issue you just experienced, running a dev server has numerous other downsides. to run a production grade server for your site.. https://github.com/brody192/vite-react-template copy the nixpacks.toml and Caddyfile from this repo into yours...
Jump to solution
9 Replies
Percy
Percy•11mo ago
Project ID: 8a00778f-e3c5-48a6-a9d1-5b5716aa6183,99e05b4b-3d83-43c6-a2a6-45e28f491164
Percy
Percy•11mo ago
Project ID: 8a00778f-e3c5-48a6-a9d1-5b5716aa6183,99e05b4b-3d83-43c6-a2a6-45e28f491164
Brody
Brody•11mo ago
maybe due to cache? but the file hashes vite generates should perform a cache bust
alfonsotrocoli
alfonsotrocoliOP•11mo ago
Vite issue, it was not busting the cache! Thanks 🙂
Brody
Brody•11mo ago
are you using the vite + react template?
alfonsotrocoli
alfonsotrocoliOP•11mo ago
no im not
Solution
Brody
Brody•11mo ago
vite didn’t generate the cache busting file hashes because youre running a dev server on railway, besides the issue you just experienced, running a dev server has numerous other downsides. to run a production grade server for your site.. https://github.com/brody192/vite-react-template copy the nixpacks.toml and Caddyfile from this repo into yours
alfonsotrocoli
alfonsotrocoliOP•11mo ago
Thanks Brody, yes! Both I copied both files on my project from the template you had 🙂
Brody
Brody•11mo ago
awesome!
Want results from more Discord servers?
Add your server