64d5834b6a
- yarn classic workspaces already do what we need - The main benefit of turbo, the cache, is already disabled on dev builds. On production builds, turbo doesn't support `next build` (this is mentioned in Vercel's docs). - We're not using their remote cache - Maybe there is a monorepo size when the yarn workspace approach gets unwieldly, but I feel we're not near that point. Will bring it back if it gets missed.
25 lines
544 B
Markdown
25 lines
544 B
Markdown
## Monorepo
|
||
|
||
The monorepo uses Yarn (classic) workspaces.
|
||
|
||
To run a command for a workspace `<ws>`, invoke `yarn workspace <ws> <cmd>` from
|
||
the root folder instead the the `yarn <cmd>` you’d have done otherwise. For
|
||
example, to build the `photos` app, we can do
|
||
|
||
```sh
|
||
yarn workspace photos next build
|
||
```
|
||
|
||
To add a local package as a dependency, use `<package-name>@*`. The "*" here
|
||
denotes any version.
|
||
|
||
```sh
|
||
yarn workspace photos add '@/utils@*'
|
||
```
|
||
|
||
To see what packages depend on each other locally, use
|
||
|
||
```sh
|
||
yarn workspaces info
|
||
```
|