Further Optimize Your Nx Workspace with Affected Commands

Share this video with your friends

Send Tweet

As your workspace grows you may need to start using more advanced optimizations.

A great option that Nx provides are "affected commands". These use git to determine the changes between your current branch and the base branch, and run a command on all projects that were affected by the changes

~ a year ago

Hey Juri, awesome content, is there a way to add HMR in this structure?

Zac Jones
~ a year ago

Hey there, this looks like it might address your question: https://github.com/nrwl/nx/issues/1881

~ a year ago

Hey Zac, thanks for your replay, i'm playing around, and i've added a normal react app using webpack, it works everything but i'm not able to enable hmr, checked your link but looks like is using a workspace file that i'm missing, my structure is almost the same that we have in this course, there is only the nx.json file.

~ a year ago

this is my working example: https://github.com/claud-io/pnpm-nx, i would like to have hmr by changing one of the dependencies like components or tools while in dev mode, is it possible? Thanks