env package in t3 turbo
env-pkg branch was merged into main and all related GH issues were closed in May. However, the t3 turbo main branch no longer has shared env pacakge. I like the implementation here https://github.com/t3-oss/create-t3-turbo/pull/135 . Why was this removed? what is the current consensus around using t3-env inside a monorepo?
GitHub
feat: add env package by juliusmarminge · Pull Request #135 · t3-os...
Closes #87
Adds @acme/env package to have typesafe env's across the monorepo.
Usage
All envs are added in a single root .env. When deploying apps, make sure the deployment has all required en...
6 Replies
@julius any info is much appreciated 🙂
it wasn't merged
it was closed
ah ok sorry my bad. Why was it not merged? What is the recommended method of managing env variables using t3-env inside a monorepo?
@marminge What is the recommended method of managing env variables using t3-env inside a monorepo?
Sorry for again it's just a really important decision for me and I'd appreciate any guidance. Thank a lot.
what works best for you
i've used both the approach with a single central env package
as well as individual env files for each service
both has it's pros and cons
I would really appreciate any more info on the pros and cons, it would be super helpful for me and my company ❤️
I'm happy to write a blog post and share the info to more t3 devs too
the most obvious one is if you have a central one you can't really run your app without a single feature missing, for example my email package might require envs to send emails, but there are a ton of stuff i can do without sending emails, and maybe not all my apps even use emails - so I'm blocked for a missing env