exclude models from bundle
Hello!
I have a monorepo (turborepo + pnpm workspaces) with packages database, schemas & contracts and apps web(nextjs 13 app) & api(nestjs app).
Database package hold all the tables, enums & relations definitions using drizzle-orm.
Schemas is using the drizzle-zod to create needed body/query schemas.
Contracts are ts-rest contracts shared between FE and BE.
The problem is that the whole database is transpiled in FE app anyways so you can easily find the table definition in source code.
How could that be prevented? (not sure if the problem lays in drizzle-zod, ts-rest or the way that I build the packages as I'm kind of new to this thins)
I have a monorepo (turborepo + pnpm workspaces) with packages database, schemas & contracts and apps web(nextjs 13 app) & api(nestjs app).
Database package hold all the tables, enums & relations definitions using drizzle-orm.
Schemas is using the drizzle-zod to create needed body/query schemas.
Contracts are ts-rest contracts shared between FE and BE.
The problem is that the whole database is transpiled in FE app anyways so you can easily find the table definition in source code.
How could that be prevented? (not sure if the problem lays in drizzle-zod, ts-rest or the way that I build the packages as I'm kind of new to this thins)







