targetDefaults could allow plugin based override #34610
fhalde
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We have several common targets—like lint, format, and test—that are shared across multiple projects and tech stacks.
Each of these targets uses nx:run-commands. Because of that, there’s no way to tell Nx that I want to override options.command specifically for the lint (or test) target that was inferred by a particular plugin.
For example:
I have a test target for a Python stack inferred by a plugin.
I also have a test target for a Vite frontend application.
Now I want to override the Python test command to include a --cov flag for CI configuration.
The problem is that this override applies to all test targets using nx:run-commands, so the Vite project also receives the --cov flag—which it doesn’t recognize.
If previously we could mention the executor to which the target belonged, why can't we mention the plugin to which the target belongs?
Our CI was much cleaner before and now we have a whole bunch of
nx affected -t py:test go:test js:test -c ci
Compare to
nx affected -t test -c ci
And I'm afraid this is not sustainable. Happy to hear what are some blockers that prevent this?
Beta Was this translation helpful? Give feedback.
All reactions