Improve caching of hoisted dependencies, e.g. yarn workspaces, turborepo, lerna, nx ...
O
Oleg Komarov
Solutions like yarn workspaces, turborepo, lerna, nx, etc... usually hoist dependencies at the root level of the monorepo.
This means that when installing a single app, e.g. the API, even if you're using the suggested Render's monorepo
rootFolder
and/or buildFilters
, you will still install all of the dependencies across all of your apps and packages. This will result in increased build time and in a non-scalable infrastructure.Netlify described how they solved their caching strategy to address yarn workspaces.
I provide additional context here.
Log In