Skip to content

Deprecated

use ProjectsConfigurations or NxJsonConfiguration

Optional $schema: string

NxJsonConfiguration.$schema


Optional affected: NxAffectedConfig

Default options for nx affected

Deprecated

use defaultBase instead. For more information see https://nx.dev/deprecated/affected-config#affected-config

NxJsonConfiguration.affected


Optional cacheDirectory: string

Changes the directory used by Nx to store its cache.

NxJsonConfiguration.cacheDirectory


Optional cli: Object

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

NameType
defaultProjectName?string
packageManager?PackageManager

NxJsonConfiguration.cli


Optional defaultBase: string

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

NxJsonConfiguration.defaultBase


Optional defaultProject: string

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

NxJsonConfiguration.defaultProject


Optional extends: string

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

NxJsonConfiguration.extends


Optional 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"
}
}
}

▪ [collectionName: string]: { [generatorName: string]: any; }

NxJsonConfiguration.generators


Optional implicitDependencies: ImplicitDependencyEntry<string[] | "*">

Map of files to projects that implicitly depend on them

Deprecated

use namedInputs instead. For more information see https://nx.dev/deprecated/global-implicit-dependencies#global-implicit-dependencies

NxJsonConfiguration.implicitDependencies


Optional 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.

NxJsonConfiguration.installation


Optional 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.

NxJsonConfiguration.maxCacheSize


Optional namedInputs: Object

Named inputs targets can refer to reduce duplication

▪ [inputName: string]: (string | InputDefinition)[]

NxJsonConfiguration.namedInputs


Optional neverConnectToCloud: boolean

Set this to true to disable connection to Nx Cloud

NxJsonConfiguration.neverConnectToCloud


Optional 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

NxJsonConfiguration.nxCloudAccessToken


Optional nxCloudEncryptionKey: string

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

NxJsonConfiguration.nxCloudEncryptionKey


Optional 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

NxJsonConfiguration.nxCloudId


Optional nxCloudUrl: string

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

NxJsonConfiguration.nxCloudUrl


Optional parallel: number

Specifies how many tasks can be run in parallel.

NxJsonConfiguration.parallel


Optional plugins: PluginConfiguration[]

Plugins for extending the project graph

NxJsonConfiguration.plugins


Optional pluginsConfig: Record<string, Record<string, unknown>>

Configuration for Nx Plugins

NxJsonConfiguration.pluginsConfig


projects: Record<string, ProjectConfiguration>

Projects’ projects

ProjectsConfigurations.projects


Optional release: NxReleaseConfiguration

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

NxJsonConfiguration.release


Optional sync: NxSyncConfiguration

Configuration for the nx sync command.

NxJsonConfiguration.sync


Optional targetDefaults: TargetDefaults

Dependencies between different target names across all projects

NxJsonConfiguration.targetDefaults


Optional tasksRunnerOptions: Object

Deprecated

Custom task runners will be replaced by a new API starting with Nx 21. More info: https://nx.dev/deprecated/custom-tasks-runner Available Task Runners for Nx to use

▪ [tasksRunnerName: string]: { options?: any ; runner?: string }

NxJsonConfiguration.tasksRunnerOptions


Optional tui: Object

Settings for the Nx Terminal User Interface (TUI)

NameTypeDescription
autoExit?number | booleanWhether to exit the TUI automatically after all tasks finish. - If set to true, the TUI will exit immediately. - If set to false the TUI will not automatically exit. - If set to a number, an interruptible countdown popup will be shown for that many seconds before the TUI exits.
enabled?booleanWhether to enable the TUI whenever possible (based on the current environment and terminal).
suppressHints?booleanWhether to suppress hint popups that provide guidance for unhandled keys. Defaults to false (hints are shown).

NxJsonConfiguration.tui


Optional useDaemonProcess: boolean

Set this to false to disable the daemon.

NxJsonConfiguration.useDaemonProcess


Optional useInferencePlugins: boolean

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

NxJsonConfiguration.useInferencePlugins


version: number

Version of the configuration format

ProjectsConfigurations.version


Optional workspaceLayout: Object

Where new apps + libs should be placed

NameType
appsDir?string
libsDir?string

NxJsonConfiguration.workspaceLayout