Interface: NxJsonConfiguration<T>

Nx.json configuration

Type parameters

NameType
T"*" | string[]

Hierarchy

Table of contents

Properties

Properties

affected

โ€ข Optional affected: NxAffectedConfig

Default options for nx affected

Deprecated

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


cacheDirectory

โ€ข Optional cacheDirectory: string

Changes the directory used by Nx to store its cache.


cli

โ€ข Optional cli: Object

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

Type declaration

NameType
defaultProjectName?string
packageManager?PackageManager

defaultBase

โ€ข Optional defaultBase: string

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


defaultProject

โ€ข Optional defaultProject: string

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


extends

โ€ข Optional extends: string

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


generators

โ€ข Optional generators: Object

List of default values used by generators.

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

Example:

1{ 2 "@nx/react": { 3 "library": { 4 "style": "scss" 5 } 6 } 7} 8

Index signature

โ–ช [collectionName: string]: { [generatorName: string]: any; }


implicitDependencies

โ€ข Optional implicitDependencies: ImplicitDependencyEntry<T>

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


installation

โ€ข 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.


namedInputs

โ€ข Optional namedInputs: Object

Named inputs targets can refer to reduce duplication

Index signature

โ–ช [inputName: string]: (string | InputDefinition)[]


neverConnectToCloud

โ€ข Optional neverConnectToCloud: boolean

Set this to true to disable connection to Nx Cloud


nxCloudAccessToken

โ€ข 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


nxCloudEncryptionKey

โ€ข Optional nxCloudEncryptionKey: string

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


nxCloudId

โ€ข 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


nxCloudUrl

โ€ข Optional nxCloudUrl: string

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


parallel

โ€ข Optional parallel: number

Specifies how many tasks can be run in parallel.


plugins

โ€ข Optional plugins: PluginConfiguration[]

Plugins for extending the project graph


pluginsConfig

โ€ข Optional pluginsConfig: Record<string, Record<string, unknown>>

Configuration for Nx Plugins


release

โ€ข Optional release: NxReleaseConfiguration

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


sync

โ€ข Optional sync: NxSyncConfiguration

Configuration for the nx sync command.


targetDefaults

โ€ข Optional targetDefaults: TargetDefaults

Dependencies between different target names across all projects


tasksRunnerOptions

โ€ข Optional tasksRunnerOptions: Object

Deprecated

Custom task runners will no longer be supported in Nx 21. Use Nx Cloud or Nx Powerpack instead. Available Task Runners for Nx to use

Index signature

โ–ช [tasksRunnerName: string]: { options?: any ; runner?: string }


useDaemonProcess

โ€ข Optional useDaemonProcess: boolean

Set this to false to disable the daemon.


useInferencePlugins

โ€ข Optional useInferencePlugins: boolean

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


useLegacyCache

โ€ข Optional useLegacyCache: boolean

Use the legacy file system cache instead of the db cache


workspaceLayout

โ€ข Optional workspaceLayout: Object

Where new apps + libs should be placed

Type declaration

NameType
appsDir?string
libsDir?string