I'm running into the same problem. I think this is because serve
uses buildTarget
to depend on build
, which is an Angular executor argument that is unaware of Nx's dependsOn
properties. It's not an "Nx executor", it's an Angular one. You'd have to specify a (seemingly redundant) chain of dependsOn
in both build
and serve
to have it "fall through" like this.
Unfortunately, e2e
is often configured a similar way, with a devServerTarget
executor argument that points to serve
. So it seems like in a regular app you'd even have to specify a dependsOn
chain up to three levels.
Did you figure out any alternative to this? I'm unsure about reporting it as an issue to Nx because it seems like it's "as designed".