Since Nx 8.12 you can do it by using the move
schematic (or mv
) to 'move' the app to the same place but with the new wanted name.
For example, if I want to rename my 'oldNG' app to be called 'newNG', I can do that like so:
nx g @nrwl/workspace:move --project oldNG newNG
Or nx g mv --project oldNG newNG
if I want to rename app from my default collection. (provisioned in angular.json).
If I want to move this app to different place- I just need to include the destination in the new name of the app, like so:
nx g @nrwl/workspace:move --project oldNG destination/newNG
Read more:
https://nx.dev/latest/angular/plugins/workspace/schematics/move