Vite + React template not loading env variable at build time
djulian
PROOP
10 months ago
Hi!
I'm using the Vite + React template (https://railway.com/template/NeiLty). The service's variable are not inject at build time.
I retry with a custom docker with variables injected using ARG VARIABLE_NAME but still, they are not injected.
I saw [this issue](https://github.com/brody192/vite-react-template/issues/1) in the repo but you guys answered it on Discord so impossible to trace it back.
So how to inject service's variable at build time in a Vite + React project?
1 Replies
10 months ago
You likely have to build the docker image again since you're using a custom. Then redeploy and it should work.