Why use a monorepo?

preview_player
Показать описание

0:00 The bug
1:02 Polyrepo or monorepo?
1:29 Creating a new monorepo
2:01 Migrating the repos
3:53 Fixing the bug
4:11 Deploying to npm
4:44 Deploying to Vercel
6:03 Summary

For more on Turborepo:

#monorepo
Рекомендации по теме
Комментарии
Автор

Well, that's more a "How" than a "Why"...

FabianVilersBe
Автор

His way of explaining is on another level!

chandragie
Автор

I love Matt's explainers. Very clear

BritainRitten
Автор

I've been very happy with Turborepo and have been using it for almost every solo project that I do. I like it's simplicity and ease of use.

kasraghoreyshi
Автор

You can also use *patch-package* which is very simple to use and you can regress the changes you have made once the repo has been updated and you see the problem you fixed is gone.

BorisBarroso
Автор

In my experience, monorepo if you're working alone and polyrepo if you're working as a team/group. But do be careful because monorepos, after they grow past a certain size, can cause tools like Git and other build tools to slow down/malfunction just because of the sheer amount of data they have to handle.

midlight
Автор

Despite not really explaining anything, I love how monorepo is bouncing back from the microservice era.

_vicary
Автор

I don't really see the benefit on the why. Maybe I'm misunderstanding it but this at least to me seems like it would introduce more problems in the future since now your project would be responsible for maintaining the code that you're using. Sure the example your giving is simple, but depending on the work this can easily be some specific call function that is dependent on a slew of other dependencies in that packages repository that they use on the side. Unless the projects abandoned and you can't find a good alternative, I feel like its better to leave off package maintanence to the maintainers of that project, and just PR fixes to that branch even if it takes hours to push.

TFDusk
Автор

Thanks for the tutorial! If only this video was made before my suffering of having to publish and installing over and over again for my package, my life would have been easier 🤣.

FacePlat
Автор

My company has a monorepo with like 20 apps and I can't even block a PR if the CI doesn't pass (like for test or linter). I'm advocating for smaller multiple repos but they won't do it because "it would take too much time to migrate from one state to another".

I don't see the point of a monorepo for more than 3-4 apps. I've worked in more than 15 stacks and still can't see any advantage of using a monorepo...

Loserfr
Автор

What if your maths package is being used on 3 separate projects? That would mean bundling the maths package with all 3? This looks like it would be useful but only when theres a 1 to 1 relationship between package and app. Or am I really missing something here?

BackInTheDayTunes
Автор

TurboRepo half-heartedly supports Docker. It seems like an afterthought. Vercel doesn't support Docker at all. I'm not trying to be rude, but a monorepo having _something_ Docker is super common, and Render offers this. Does the TurboRepo/Vercel team have any plans for improving Docker support in the upcoming year?

Specifically, I want to be able to put a docker-compose.yml in every app and/or package in my TurboRepo project, then deploy with something as simple as `$ vercel deploy`. I'd be sold for life.

CoryTheSimmons
Автор

Haven't seen anything with nextjs with custom server (check NextJs
That would be cool an example! Just saying. (Having huge troubles myself with it, its impossible to resolve workspace modules)

aleksd
Автор

Cool! Wish you could make a more indepth video about turborepo monorepo and share more stuff like ts types/react hooks/state stores/api requests among multiple apps or even packages.

grugbrain
Автор

this video was great
It really demostrates the use of Turborepo very well

alirzana
Автор

what is the actual advantages of turborepo over pnpms built-in workspaces?

gamertike
Автор

How is the maths repo configured? Is the example published?

QiuqiuVG
Автор

quick question;

If I were to have my Azure pipeline covering my monorepo, and each successful build would become a release, would turborepo consider a cached build (so out of my 2 apps I have, App1 is cached and App2 has changes to be rebuilt, alongside a ui package for shared react components lets say) a succesful build and thus cause a re-deployment for both apps? this is what my team is currently struggling with. Or is there a way we could emit the cache hit/missed to our pipeline so we can then have that determine wether or not to re-deploy

Mikkelzu
Автор

what happen if i have many project and many package, can it make slow on build or start app on development?

RicoRioss
Автор

Inefficient for huge applications that have complex CI pipelines for fixing this type of problem. There are also other aspects to what type of architecture fits best, depends on use case.

seanki