Setting OnPush as default for all applications in nrwl-nx

Viewed 512

Is there a way to have all components generated with OnPush?

Similar to: ng config schematics.@schematics/angular.component.changeDetection OnPush

2 Answers

found the solutions to my question :)

just add

"@schematics/angular:component": {
      "style": "scss",
      "changeDetection": "OnPush"
 }

to yor workspace.json file at the very end of "schematics": {} :)

Inside nx.json, do the following:

"@nrwl/angular:component": {
      "style": "scss",
      "changeDetection": "OnPush" // add this
    }
Related