Closed zanzlender closed 9 months ago
This was my bad... I defined the "projectName" variable in Drizzle config, then imported that in the schema, which t3-env then picked up as using on the client. Although I think my point was still kinda valid, this was a problem created by me and I don't believe it's worth the implementation time...
I encountered an unexpected problem while I was playing with T3, drizzle and the drizzle-zod package. Maybe I am wrong and it's supposed to be like this, correct me if that is so. The example shows my setup - simplified for showcase.
Drizzle schema (schema.drizzle.ts)
Usage
Problem
Both createUserSchema and zFinanceSettingsSchema are normal Zod types. However, when I want to use it inside a Client component - just import that type to put inside resolver for React Hook Forms - I get this error:
Maybe I am missing something, but I don't see a reason to throw an error if I only import the type and do not use any variable or drizzle, which also won't be used at buildtime.