monoreponrwl-nxnrwlangular-workspace-configuration

Creating NX Monorepo with concrete (older) Angular version


Generating NX Monorepo Workspace (https://nx.dev/) is straight forward here the steps:

  1. npx create-nx-workspace (to create empty workspace)
  2. yarn add -D @nrwl/angular (to add nx's angular plugin/schematics)
  3. nx generate worspace-schematic:application (to add Angular application to the NX Workspace)

What you will get is a NX workspace with Angular(latest version) application inside it. But what if I want to create NX workspace with Angular 8.0 application inside it. What would be the correct approach to create NX workspace with a concrete Angular version inside it?


Solution

  • find version of create-nx-workspace that corresponds your angular version. usually it matcher angular version

    then do (this example is for angular 10) npx create-nx-workspace@10.4.10 name-of-new-workspace