Replies: 1 comment 7 replies
-
So I think there's nothing special required for monorepo 🤔 |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using Yarn 2 Workspaces to manage multiple sub-projects/packages in a mono-repo with the following folder structure.
📂 apps
-┣ 📦 api
-┣ 📦 portal
-┣ 📦 engine
📂 shared
-┣ 📦 database
--┗ 📂 prisma
--┗ 📂 src
---┗ 📂 type-graphql // custom-configured output folder (contains generated code by typegraphql-prisma)
---┗ index.ts // export * from './type-graphql'
--┗ tsonfig.json
--┗ babel.config.js
--┗ package.json
-┣ 📦 ui
-┣ 📦 utils
...
The database package should export all generated code by typegraphql-prisma so that I can use it in the api package (e.g. import { Advertiser, Brand } from '@monorepo/database').
When I do it this way and use the package database in the api package, I get the following error:
Cannot find module './type-graphql'
So I'm wondering what I'm doing wrong.
This is my babel file:
Prisma snippet:
Any thoughts? Tips?
Please let me know if something is unclear.
Beta Was this translation helpful? Give feedback.
All reactions