defaultCollection
ExperimentalConfiguring defaultCollection will no longer have any effect in Nx 17+
In the nx.json you can set a defaultCollection property like this:
1{
2 "cli": {
3 "defaultCollection": "@nx/next"
4 }
5}
6This would cause the following command
โฏ
nx g library my-lib
To create a @nx/next:library library instead of some other generator with the name library.
This property is no longer needed because the Nx cli automatically will prompt you to choose between the available options if there is any ambiguity. The output looks like this:
โฏ
> nx g lib my-lib
โฏ
? Which generator would you like to use? โฆ
โฏ
@nx/react-native:library
โฏ
@nx/angular:library
โฏ
@nx/expo:library
โฏ
@nx/nest:library
โฏ
@nx/node:library
โฏ
@nestjs/schematics:library
โฏ
@schematics/angular:library
โฏ
@nx/js:library
โฏ
@nx/next:library
โฏ
@nx/react:library
โฏ
None of the above