Skip to content

Nx.json configuration

Properties

$schema: string

affected: NxAffectedConfig

Default options for nx affected

cacheDirectory: string

Changes the directory used by Nx to store its cache.

cli: Object

Default generator collection. It is used when no collection is provided.

defaultBase: string

Default value for —base used by nx affected and nx format.

defaultProject: string

Default project. When project isn’t provided, the default project will be used. Convenient for small workspaces with one main application.

extends: string

Optional (additional) Nx.json configuration file which becomes a base for this one

generators: Object

List of default values used by generators.

These defaults are global. They are used when no other defaults are configured.

Example:

{
"@nx/react": {
"library": {
"style": "scss"
}
}
}

implicitDependencies: ImplicitDependencyEntry

Map of files to projects that implicitly depend on them

installation: NxInstallationConfiguration

Configures the Nx installation for a repo. Useful for maintaining a separate set of dependencies for Nx + Plugins compared to the base package.json, but also useful for workspaces that don’t have a root package.json + node_modules.

maxCacheSize: string

Sets the maximum size of the local cache. Accepts a number followed by a unit (e.g. 100MB). Accepted units are B, KB, MB, and GB.

namedInputs: Object

Named inputs targets can refer to reduce duplication

neverConnectToCloud: boolean

Set this to true to disable connection to Nx Cloud

nxCloudAccessToken: string

If specified Nx will use nx-cloud by default with the given token. To use a different runner that accepts an access token, define it in tasksRunnerOptions

nxCloudEncryptionKey: string

Specifies the encryption key used to encrypt artifacts data before sending it to nx cloud.

nxCloudId: string

If specified Nx will use nx-cloud by default with the given cloud id. To use a different runner that accepts a cloud id, define it in tasksRunnerOptions

nxCloudUrl: string

Specifies the url pointing to an instance of nx cloud. Used for remote caching and displaying run links.

parallel: number

Specifies how many tasks can be run in parallel.

plugins: PluginConfiguration[]

Plugins for extending the project graph

pluginsConfig: Record

Configuration for Nx Plugins

release: NxReleaseConfiguration

Configuration for nx release (versioning and publishing of applications and libraries)

sync: NxSyncConfiguration

Configuration for the nx sync command.

targetDefaults: TargetDefaults

Dependencies between different target names across all projects

tasksRunnerOptions: Object

tui: Object

Settings for the Nx Terminal User Interface (TUI)

useDaemonProcess: boolean

Set this to false to disable the daemon.

useInferencePlugins: boolean

Set this to false to disable adding inference plugins when generating new projects

workspaceLayout: Object

Where new apps + libs should be placed