Hi, I am having the same problem. This solution is working locally for development but when I deploy to preview or production the values are undefined.
Thanks for helping me get this far. It's nice to have a development working. If you have any idea how to get preview and production to work I would be truly in your debt.
Hi, I am having the same problem. This solution is working locally for development but when I deploy to preview or production the values are undefined.
Thanks for helping me get this far. It's nice to have a development working. If you have any idea how to get preview and production to work I would be truly in your debt.
A workaround I found for now is to list all the variables you want in the client side code in the
env
property of the Next.js config.I updated the post with more details.
Sweet, thanks. I tried it and it's working. Very helpful.