-
-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: make packages pure and only validate env's in apps #397
Comments
t3-env
validation in packages/config
t3-env
validations in packages/config
Hi! I was running into the same problem. There's indeed tedious to have env variable validation in multiple packages and if you want to use the same env variable in another package, you have to run validation again. My question is: Why should Personally, I would rather have packages more pure, and only have env variables in the For Example in Any suggestions or ideas @juliusmarminge ? |
I'd like that too, however I'm not sure how to implement that in a nice way. Open for PRs! I don't want a separate |
t3-env
validations in packages/config
I thought about this as well while dealing with envs. I agree with @cjkihl that it is better if we only have env variables in the |
I've also ran into this issue replacing the |
wondering why packages/db doesn't validate env but packages/auth does @juliusmarminge |
Describe the feature you'd like to request
From the template, we're using
t3-env
validations separately inapps/nextjs
andpackages/auth
. If I want to use the environment variables inpackages/api
then I need to set upt3-env
validations separately for that workspace. This looks like a duplicated code and I think we should refactor it.Describe the solution you'd like to see
I suggest to put the
t3-env
validations inpackages/config
or in a new workspace, then other workspaces likeapps/nextjs
,packages/db
,packages/auth
andpackages/api
can just import it whenever they want to use them.Additional information
I would love to work on this if you guys agree to pick this up
Similar issue - #385
The text was updated successfully, but these errors were encountered: