I think the question is self-explanatory... Is there a way to generate Angular App shell in an integrated Nx monorepo workspace?
I know that if we call, let's say, nx g @nx/angular:service my-service --project=lib-name
, because we're trying to invoke a generator that is not present in @nx/angular
, the request will automatically be forwarded to @schematics/angular
.
But generating an App shell in Angular is completely different! So I was wondering, is there a solution to this that I'm missing out here?
Thanks a heap.
Well, although it seems that generating an App shell is different, but it's not! When generating an App shell, we don't pass a name option... So we don't also need to pass a name when calling the command via Nx.
So here's what we need to run: nx g @nx/angular:app-shell --project=app-name
This command actually fallbacks to @schematics/angular
without any issues.
And then build the production files by running: nx run app-name:app-shell:production