TargetConfiguration
Target’s configuration
Type parameters
Section titled “Type parameters”| Name | Type |
|---|---|
T | any |
Table of contents
Section titled “Table of contents”Properties
Section titled “Properties”- …
- cache
- command
- configurations
- continuous
- defaultConfiguration
- dependsOn
- executor
- inputs
- metadata
- options
- outputs
- parallelism
- syncGenerators
Properties
Section titled “Properties”…
• Optional …: true
Spread token used when merging target configurations. When set to true,
base (inferred) values take priority over this target’s values for any
shared keys — effectively “only add new keys without overwriting inferred
values”. Keys that do not exist in the base target are still added.
The position of '...' in the object’s key order follows standard
last-write-wins semantics with https://nx.dev/reference/project-configuration#spread-token.
• Optional cache: boolean
Determines if Nx is able to cache a given target.
command
Section titled “command”• Optional command: string
Used as a shorthand for nx:run-commands, a command to run.
configurations
Section titled “configurations”• Optional configurations: Object
Sets of options
Index signature
Section titled “Index signature”▪ [config: string]: any
continuous
Section titled “continuous”• Optional continuous: boolean
Whether this target runs continuously
defaultConfiguration
Section titled “defaultConfiguration”• Optional defaultConfiguration: string
A default named configuration to use when a target configuration is not provided.
dependsOn
Section titled “dependsOn”• Optional dependsOn: (string | TargetDependencyConfig)[]
This describes other targets that a target depends on.
executor
Section titled “executor”• Optional executor: string
The executor/builder used to implement the target.
Example: ‘@nx/rollup:rollup’
inputs
Section titled “inputs”• Optional inputs: (string | InputDefinition)[]
This describes filesets, runtime dependencies and other inputs that a target depends on.
metadata
Section titled “metadata”• Optional metadata: TargetMetadata
Metadata about the target
options
Section titled “options”• Optional options: T
Target’s options. They are passed in to the executor.
outputs
Section titled “outputs”• Optional outputs: string[]
List of the target’s outputs. The outputs will be cached by the Nx computation caching engine.
parallelism
Section titled “parallelism”• Optional parallelism: boolean
Whether this target can be run in parallel with other tasks Default is true
syncGenerators
Section titled “syncGenerators”• Optional syncGenerators: string[]
List of generators to run before the target to ensure the workspace is up to date.