Why I’m using a monorepo with Yarn workspaces

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Hi, I just love your unscripted, no flashy clickbait thumbnail kind videos, always get to the point, great stuff 💛. Would like some videos on your thoughts about contributing to open source and how to get started, etc., or is it necessary to get a remote job. Anyways love your videos, keep going 🔥

prasanthrv
Автор

I'm just getting started with yarn and building a monorepo structure and this overview was super helpful! I'd love to hear what snags you ran into along the way and your take on if it's worth it in the long run.

meganfrankosky
Автор

This is cool, without you I wouldn't know this exists. I had a question in my mind for a long time on how to couple my project parts/apps in a single git and here you are :). Your videos are like going into the local bakery and see bread being made, that's what makes your channel unique. 👍

hsider
Автор

From my experience, the main challenge I faced - building the server, because after adding monorepo I ended up with the server code that I no longer could just copy over to my hosting provider via FTP, since it now had a dependency on my local "shared" repository. I needed to add bundling that would make "shared" code part of the server's PROD build. That's the major downside to monorepos.

notarealhandle
Автор

Looking at your videos there is clearly so much more to being a web developer than just React for the frontend and Java/C# or whatever language for the backend. Can you make a video talking about the "unspoken" tools and tasks that are expected of each end of the stack?

JegErNrsk
Автор

Great video. I also had trpc not importing types when using in pnpm wokrspaces but the issue was that we have to install trpc/server in the client package as well for types to work. Now I have trpc as separate package and types work correctly

amitsingh
Автор

Thanks for sharing, your content helps a lot

medalikhaled
Автор

Hey, mate! Great video. Can you share what VSCode theme are you using?

aleksandrszagorskis
Автор

highly useful, very informative. Thank you

gordonfreimann
Автор

you should reference the projects in the package json not only using "*" but "workspace:*"

theupsider
Автор

Interesting, thanks for posting this. I've been making the rounds, trying to build the perfect boostrap/prototype DX for a fullstack serverless + React application, in a basic monorepo. The issue I've run into so far, is the hoisting of node_modules to the top level of the repo. It seems to break any shared references in the lambda functions, since it can't deploy what isn't directly available inside of the lambda portion of the repo. I'm turning to Yarn now, as a last-ditch effort, because it seems to be the only pkg manager that allows "nohoist", and allows you to physically divide node_modules to the various project/package folders within the monorepo. I don't care about disk space, I just want shared code to work within my lambdas! Any thoughts on that?

VincentJenks
Автор

A good practice for monorepos is not to use specific package names in workspaces, but rather use "packages/*". The reason is to be able to deploy packages only as needed. For example, you want to deploy a server - you copy just the server + shared packages, then you can run the root install successfully, and it won't be looking for "client" package on the server, whereas in your approach it will.

notarealhandle
Автор

Nice video @WebDevCody! One question came in my mind - how do you deploy the API package individually as they have common dependencies in a shared node_modules folder?

berkesandras
Автор

do I need to use workspaces if I'm using pnpm?
I don't know that much about workspaces bu from what you've said seems like it's used to save disk space.

anasouardini
Автор

I have hard time to understand how all this beauty works in prod?
How to you compile the needed imported packages and run everything using Docker?

lacherolachero
Автор

When you upload the code to version control, do you upload each of the workspace into separate repo and linked it by submodule? Or just in one repo?

hnnazm
Автор

yo, what 's the Packege manager that ur gonne stick with for the future I've heard that Pnpm is more effiecient then npm what would you say about it ???

amranimohamad
Автор

Is it possible to setup with Yarn 3.5 PnP mode and ts-node as a major executor of the code in developer mode?

OleksandrKucherenko
Автор

Do you have good reasons to why aren't you using yarn berry?

JohnZakaria
Автор

Hi Web Dev Cody, I thought of checking out this project of yours and after getting overwhelmed by the sheer amount of stuff you used a question came in mind. How did you know that which technology you have to use and why? And did you learn those technologies before using or just read the docs and did the bare bones? It would be really great if you could reply.

Hiperultimate