Are variables exposed during build?
Are environment variables exposed during the build step? Or only the deployment?
16 Replies
Project ID:
N/A
N/A
I suspect that some variables are not being exposed during a build step in my docker image. I don't have a great way of tracking this down. "works on my machine" but not on railway
yes they are exposed as build args
hmmmmmmmmm idk. My vite builds don't seem to have the variable in them.
dockerfile or nixpacks?
dockerfile
send it?
theres no build args there
Yea. I wouldn't normally need it. Just not used to the way Vite handles environement variables. But I guess just some
ARG VITE_NAME_OF_THING
should be goodSolution
you absolutely do need them haha, if you want to use variables during build
Yea, let me go try that. I hope it fixes my issue.
Finally getting around to fixing it from all that time ago
Yay!!! It actually works now!! Now when a user reports a bug I can spy on them to find out if it was human error or a me error. Thanks posthog
lmao
jk about the spying. Well ... kinda. It is sessions. I can see what they did. Great feature
That is what made me prioritize coming back to this. A user complained about a bug that in my mind is actually impossible. But I can't tell them that. So now we wait for them to report it again ... and I see if it really is a bug ....
A user complained about a bug that in my mind is actually impossible. But I can't tell them thatstory of my life