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
Solution:Jump to 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...
9 Replies
Project ID:
8a00778f-e3c5-48a6-a9d1-5b5716aa6183,99e05b4b-3d83-43c6-a2a6-45e28f491164
Project ID:
8a00778f-e3c5-48a6-a9d1-5b5716aa6183,99e05b4b-3d83-43c6-a2a6-45e28f491164
maybe due to cache? but the file hashes vite generates should perform a cache bust
Vite issue, it was not busting the cache! Thanks 🙂
are you using the vite + react template?
no im not
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
Thanks Brody, yes! Both I copied both files on my project from the template you had 🙂
awesome!