Astro Zod environment variable validation
How can I implement the same pattern T3 app uses in env.mjs uses in Astro?
5 Replies
anyone?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Astro already pulls an env.mjs of its own with some default values. Wouldn't it conflict with our custom one? And how do you make the code run on build time? In Next you import it in next.config.cjs. I think something went wrong when I tried it in astro.config.ts. Can you confirm these two
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
It doesn't have an env.mjs in the project, but it creates one in the background apparently. I noticed it in the network tab. I guess I'll need to play with things or ask the Astro team themselves then