b0o
b0o
Explore posts from servers
TTCTheo's Typesafe Cult
Created by b0o on 12/13/2023 in #questions
t3-env in a monorepo
When using t3-env in a monorepo where different sub-packages need different parts of the env, is it recommended to create a sub-package specifically for the env and put all of the env vars in there, or for each sub-package to manage its own env? The issue with the latter is of course that sometimes multiple packages depend on the same env vars, leading to code duplication. The issue with the former approach is that it feels like poor encapsulation and gives packages access to env vars that don't apply to them.
10 replies