No BS TS #32 - Monorepos with NX

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 พ.ย. 2024

ความคิดเห็น • 82

  • @shashydass4114
    @shashydass4114 3 ปีที่แล้ว +10

    Having dealt with non monorepo development in 2 previous jobs, I cannot stress how much more productive working with a monorepo is. The hardest part is getting a monorepo organized and working. So thanks Jack for putting this video together demonstrating how to do this with NX. Great content as usual!

  • @natekidwell9099
    @natekidwell9099 3 ปีที่แล้ว +3

    Glad to you see your Nx video Jack. It's probably my favorite piece of tooling these days, with a very lively slack.

  • @dewaunayers1405
    @dewaunayers1405 2 ปีที่แล้ว +1

    Thanks for posting this. Seems way easier to use than Rush. Going to be trying this out and hopefully standing up some work projects with it!

  • @jspenc
    @jspenc 3 ปีที่แล้ว +1

    Thanks for bringing this to my attention, coming over from the .NET world it has always felt like there was some kind of solution equivelent missing. Going to have a more in depth play with this and present it the team!

  • @rudeKiNG013
    @rudeKiNG013 ปีที่แล้ว +2

    We started with lerna monorepos for our next.js and react projects. For a while it was fine, but it quickly became a nightmare. All the deps linking, hmr, typescript etc. are really difficult to get right. Now we are moving our project to Nx. Thanks for this awesome video, helped us a lot in our decision making.

    • @leftinashes
      @leftinashes ปีที่แล้ว

      Same situation for my last project. I was tasked with creating and maintaining a monorepo. Decided on TypeScript / React, Lerna, and Rollup to assist with CommonJS (for Node) and ES module (for bundlers) builds. As you mentioned, Lerna was amazing until we started adding additional repos / sub-modules and the symlinks started becoming broken and unstable. How many times did you have to run `lerna clean && lerna bootstrap` to fix all the symlinks? Lol... Switched to NX and it couldn't be easier!

  • @martinsonuoha
    @martinsonuoha 3 ปีที่แล้ว +2

    Jack, I just want to say Thank you, all your contents are awesome and useful, I love them and look forward to each one. Keep up the great work!

  • @az1nn
    @az1nn 2 ปีที่แล้ว +3

    its amazing how Jack can put so much great content in less than 10 minutes! thanks man, i really love your channel!

  • @TiagoGomes-ox8nm
    @TiagoGomes-ox8nm ปีที่แล้ว +2

    Started checking your videos a few weeks ago and can't stop seeing them! Would like to see a transformation of a repo to a monorepo using Nx. Seems it could be quite cool to transform some monoliths to monorepos

  • @stephaniemason7201
    @stephaniemason7201 2 ปีที่แล้ว +1

    Used this to help learn NX! Thank you

  • @EveryDayLifeWithDiabetes
    @EveryDayLifeWithDiabetes ปีที่แล้ว +1

    Hey Jack, Thank you for sharing this fantastic video.
    I have a question, we want to implement Mono-repo for our project, but we also wish to implement Module-federation in this Mono-repo project.
    Based on your experience, will it be a good decision?

    • @jherr
      @jherr  ปีที่แล้ว +1

      It really depends on your requirements. I'm pretty conservative when it comes to my architectures. For example, it should be a regular repo until you get more than one application and those applications need to share code, then make it a mono-repo. It should just be regular NPM sharing of code until you have an overwhelming need to use a runtime dependency structure and then you should use Module Federation (or some other technology). Requirements should drive tech choices, not the other way around.

  • @sourishdutta9600
    @sourishdutta9600 3 ปีที่แล้ว +3

    First of all, thank you so much 🙏. Now can you please make one video on how to structure Nx workspace for a large enterprise application. Like domain specific lib , feature lib and shared lib. Each module scoping. How to structure for big applications. Will be great for architecture wise. Thank you 😊

    • @jherr
      @jherr  3 ปีที่แล้ว +3

      We'll see how this one does. That would be a long video which takes a lot to produce. It sounds great, but I want to make sure there would be an audience for it.

    • @sourishdutta9600
      @sourishdutta9600 3 ปีที่แล้ว +1

      @@jherr sure sir definitely. If someone want to achieve monorepo and good micro frontend architecture, I think Nx is a great platform. I will be waiting. Thank so much. Learned a lot from your channel.

    • @jherr
      @jherr  3 ปีที่แล้ว +3

      ​@@sourishdutta9600 If you do write about it, do me a solid and link to this video, and maybe together we can get Nx to connect with us and help get the word out. I'm down with the enterprise architecture thing, I'd LOVE to talk about that, I'd LOVE to do the work to get Module Federation working in Nx and show that off. But doing all that then getting a couple hundred views is kinda... ugh.

    • @sourishdutta9600
      @sourishdutta9600 3 ปีที่แล้ว

      @@jherr I have not done yet. I will surely do sir. I got your point 😊 thank you so much.

    • @natekidwell9099
      @natekidwell9099 3 ปีที่แล้ว +1

      manfred steyer has some talks/books showing microfrontends with Nx. mostly for angular I think.

  • @yaserghananwi
    @yaserghananwi 3 ปีที่แล้ว +1

    thank you for this nice tutorial Jack .....really really nice

  • @AmxCsifier
    @AmxCsifier ปีที่แล้ว

    5:48 how do you select the text so easily? Do you press something on the keyboard? Or is it an option that can be enabled on MacOS?

  • @herol3oy
    @herol3oy 3 ปีที่แล้ว +2

    NX! Fantastic idea! Thanks for the video. Angular and Nx are very good couple by the way ;)

  • @juandrago5433
    @juandrago5433 2 ปีที่แล้ว +1

    Hi Jack, would you still recommend using NX in 2022 for monorepos? Would you recommend other libraries instead?

    • @jherr
      @jherr  2 ปีที่แล้ว +1

      If you liked the canned project setups from NX then I would definitely still use it. If I was looking for something less opinionated I would go for Turborepo.

    • @juandrago5433
      @juandrago5433 2 ปีที่แล้ว

      @@jherr thank you! I'll try turborepo too, plus it seems to be the recommended tool for monorepos in Vercel docs. Thanks so much for your great work!

  • @chromegoogle-yi4jv
    @chromegoogle-yi4jv 2 ปีที่แล้ว

    thanks for great content can you please tell extension u r using to highlight branch name

  • @bogrisss
    @bogrisss 2 ปีที่แล้ว +1

    Mulțumim!

  • @alonbrendlor2104
    @alonbrendlor2104 9 หลายเดือนก่อน

    If I have one react project written using react-create-app and another project with vue2 which are in two different git's, is it possible to migrate to NX monorepo? Your video explains how to create new projects, but not an existing one

  • @akkimahajan6799
    @akkimahajan6799 3 ปีที่แล้ว +1

    Never thought this would have been so much easier to work with compared to Lerna monorepo. Great content as always Jack. Although seems like you missed something about the thing you mentioned as a single version policy through different apps using the same dependencies. Wanna see that in action for sure.

  • @middlefloor
    @middlefloor 3 ปีที่แล้ว +2

    Great walkthrough!

  • @danwhite2717
    @danwhite2717 ปีที่แล้ว

    Would you recommend a package-based or integrated mono-repo?

  • @AmitPatils
    @AmitPatils 3 หลายเดือนก่อน

    @jack : Can you please make one more descriptive video about NX, covering react application with different/distinct modules....telling us whats difference between lib and component....when to use lib and when to use component....

  • @marcelsdev
    @marcelsdev 3 ปีที่แล้ว +1

    Thanks for another great video!

  • @TiagoMesan
    @TiagoMesan 2 ปีที่แล้ว +1

    Very nice video, thanks!

  • @JulioDx3480
    @JulioDx3480 3 ปีที่แล้ว +1

    Thank you for the informative videos.

  • @andriimuntian3632
    @andriimuntian3632 3 ปีที่แล้ว +1

    Super cool! Thank you!

  • @ThomasBurleson
    @ThomasBurleson 2 ปีที่แล้ว

    Don't the Nx Console for Visual Studio... amazing.
    And you can also show how to "protect" you libraries from deep imports using lint and tsconfig.
    And finally `nx graph` is amazing to show you library dependences.

  • @xtinctspecies
    @xtinctspecies 3 ปีที่แล้ว +1

    high quality genuine content

  • @gransmistad323
    @gransmistad323 2 ปีที่แล้ว +1

    When I create React components, I like giving the files names that correspond with the component names. Is it possible to configure NX to name React files this way?

    • @gransmistad323
      @gransmistad323 2 ปีที่แล้ว +1

      Sorry, I was a bit lazy :) I found the answer to this in the docs. Just supply --pascalCaseDirectory true and/or --pascalCaseFiles true when generating components

  • @大盗江南
    @大盗江南 2 ปีที่แล้ว +1

    Thank you Jack, i learnt a lot from ur videos.

  • @philykearney
    @philykearney 3 ปีที่แล้ว +1

    Great video Jack! 👍

  • @codezero6023
    @codezero6023 3 ปีที่แล้ว +1

    At work, we use Lerna and gulp (legacy)

  • @Andreas-oq2gz
    @Andreas-oq2gz 2 ปีที่แล้ว +1

    really great content!

  • @satwantsingh9627
    @satwantsingh9627 3 ปีที่แล้ว +1

    Awesome Vid, No BS on TS

  • @siddharthagrawal1733
    @siddharthagrawal1733 2 ปีที่แล้ว +1

    Thanks for putting such amazing content!

  • @axios7776
    @axios7776 3 ปีที่แล้ว +1

    This is super nice, but it forces you to the use there library only (unless there is a way to decouple stuff).
    I would suggest that you check out typescript project references.

    • @purduetom90
      @purduetom90 ปีที่แล้ว

      Why is it so bad to use their library? Any project you build is going to depend on many other tools and toolsets to get things done. So, why is this one a sticking point?

  • @PickleRiiiiiiick
    @PickleRiiiiiiick 2 ปีที่แล้ว +1

    You have a new subscriber. Keep up the quality videos.

  • @StephenJWoodruff
    @StephenJWoodruff 3 ปีที่แล้ว +1

    Hey Jack - I love the videos, thanks for all your time and effort that you put into them! Do you have any experience building a monorepo with rush? I am curious how NX won you over.

    • @jherr
      @jherr  3 ปีที่แล้ว

      I hand rolled my own lerna repo a few months back. I tried rush a while ago but it didn't grab me. What do you like about it?

  • @igotbit9454
    @igotbit9454 2 ปีที่แล้ว +1

    very helpful!!!!!!
    love your channel.

  • @chioo9495
    @chioo9495 3 ปีที่แล้ว +1

    waiting for big project using react ts :)

  • @joeygarcia7826
    @joeygarcia7826 2 ปีที่แล้ว +1

    Very nice demonstration! Subscribing!

  • @tytremblay5401
    @tytremblay5401 2 ปีที่แล้ว

    Could we see a monorepo setup with Turborepo?

  • @VinitNeogi
    @VinitNeogi ปีที่แล้ว +1

    Nx is awesome

  • @leoamato6113
    @leoamato6113 2 ปีที่แล้ว

    thank you, great video

  • @거누권
    @거누권 2 ปีที่แล้ว +1

    awesome!!!

  • @purduetom90
    @purduetom90 ปีที่แล้ว

    Love your channel and how you are able to demonstrate and explain concepts. I've learned so much by watching and your videos. Regarding mono repos with Nx, how would you compare that to using yarn workspaces, or packages? It seems Nx does so much more for you, but I'm new to this...

    • @jherr
      @jherr  ปีที่แล้ว

      AFAIK NX sits on top of that to provide additional tooling.

  • @bogrisss
    @bogrisss 2 ปีที่แล้ว +1

    Genius👌👌

  • @sairaj5660
    @sairaj5660 3 ปีที่แล้ว +1

    Can't thank you enough 🙏

  • @learner8084
    @learner8084 ปีที่แล้ว

    Are there full tutorials on Monorepo ?

  • @techhguy
    @techhguy 3 ปีที่แล้ว +1

    Awesome!

  • @bryanltobing
    @bryanltobing 2 ปีที่แล้ว +1

    full nx tutorial?

  • @stefanahlander871
    @stefanahlander871 2 ปีที่แล้ว

    YT likes comments and I love your content. 😀 Win win!

  • @denilsoncosta9837
    @denilsoncosta9837 3 ปีที่แล้ว +1

    will you bring more videos about NX?

    • @jherr
      @jherr  3 ปีที่แล้ว +4

      Probably. Would definitely like to do one on Module Federation if we can get that set up. Angular would be interesting, I haven't done Angular in a dogs age. Also, oooo... Like a project that has both react and react-native apps using a shared set of components? Or at least shared API logic? I've wanted to see that IRL forever.
      Your thoughts?

    • @denilsoncosta9837
      @denilsoncosta9837 3 ปีที่แล้ว +1

      @@jherr I think maybe a fullstack react(next.js) - express would be a good showcase of the NX, because without a monorepo, is hard to manage shared code between front and back!

    • @jherr
      @jherr  3 ปีที่แล้ว +1

      @@denilsoncosta9837 I like that, and I actually got exactly that question ("How do I share types between the front end and back end?") just recently. So that would be good. Thank you for the inspiration! And for being a viewer.

    • @denilsoncosta9837
      @denilsoncosta9837 3 ปีที่แล้ว

      @@jherr Always here!

    • @TheKluVerKamp
      @TheKluVerKamp 3 ปีที่แล้ว

      @@jherr +1 for the react-native + react!!

  • @adimaralimuddin96
    @adimaralimuddin96 2 ปีที่แล้ว +1

    thanks

  • @360nickx
    @360nickx 3 ปีที่แล้ว +1

    I love it. :D

  • @EzekielDwaine
    @EzekielDwaine 2 ปีที่แล้ว +1

    Wow, what is thattt? so cool

  • @sbrugby1
    @sbrugby1 3 ปีที่แล้ว +1

    I feel extremely uncomfortable being dependent on a single company for 40 plugins just to make my monorepo work. Especially when many of those are community maintained. They also seem to have no mention of docker.

    • @jherr
      @jherr  3 ปีที่แล้ว

      I'm not affiliated with NX, but I'm not as concerned. It's just the build and dependency mechanics. I wouldn't be depending on them for APIs. If I decided to jump ship I'd just have to pull out the dependencies and do the wiring myself. Which, the last time I did it, was about 2-3 hours worth of work and another maybe eight hours over the first couple months.

    • @natekidwell9099
      @natekidwell9099 3 ปีที่แล้ว

      not affiliated either but there is a maintained plugin for docker (nx.dev/nx-community) and I can vouch that the docker side works fine without the plugin (which I haven't tried). there's always some risk when a company is involved of course, but that's also the case for most OSS afaik. the gh does show constantly increased development (github.com/nrwl/nx/graphs/contributors) which is promising for its future (🤞).

  • @kamalkamals
    @kamalkamals 2 ปีที่แล้ว +1

    Where is deploy part ? Why all urs video NX multiple apps not talking about deploy apps

    • @jherr
      @jherr  2 ปีที่แล้ว

      There are lots of different ways/services to deploy apps. Plus, I kinda rely on folks to read the deployment docs for their platform/service.

  • @miguelyoutube100
    @miguelyoutube100 ปีที่แล้ว +1

    Great video, thanks 😊