Hey folks,
I am currently setting up a monorepo project using pnpm, turborepo, typescript, and nestjs.
The folder structure is like this
└── my-ts-monorepo/
├── apps/
│ └── server
└── libs/
└── utils
The utils library is added as a dependency in the server application.
utils is a simple typescript library with some math functions and server is a NestJS REST API.
Everything is working fine except for one thing. While running the dev server, if I make any code changes in the utils library, the changes are not picked up by the server application.
I tried running the tsc build for the utils library with the --watch flag, but no luck there also.
The dev scripts look like this
/* root package.json */
"dev": "turbo run dev"
/* apps/server/package.json */
"dev": "nest start --watch"
/* libs/utils/package.json */
"dev": "tsc --watch"
Please help me so that the NestJS dev server can pick up code changes in the utils dependency also.
Thanks!
Top comments (2)
Try Project References. As an illustrative example, you can use the Ditsmod repository, where this feature has already been implemented.
@sainig what did you end up doing?