Hey all. I’m starting a project with Prisma and lo...
# orm-help
r
Hey all. I’m starting a project with Prisma and loving it. The setup is: Create React App (Typescript), ExpressJs backend. It is a monorepo so the structure is like this: • Monorepo ◦ /backend ▪︎ /prisma • prisma.schema ◦ /frontend ▪︎ src • all the stuff Is there a way to share access to the prisma package/instance so that I can access the specific types in the frontend folder like I do in the backend folder (
import Prisma, { PrismaClient } from "@prisma/client";)
?
m
probably want to set up typescript project references and create a separate workspace for the repository also you can do
import type Prisma from "@prisma/client"
if you just want the types but not to actually bring the prisma code into your frontend app
r
hey @Misha are you talking about yarn workspaces? I need the specific types defined by my
schema.prisma
file not just the standard types which is why I’m thinking I need a reference to the instance of prisma I have in my
backend
folder
m
npm workspaces
👍 1