Skip to content

Commit

Permalink
docs(core): deprecate npmScope (#17321)
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacplmann authored Jun 2, 2023
1 parent 47b8c60 commit afd3cfd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/shared/reference/nx-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ The following is an expanded version showing all options. Your `nx.json` will li
```json {% fileName="nx.json" %}
{
"extends": "nx/presets/npm.json",
"npmScope": "happyorg",
"affected": {
"defaultBase": "main"
},
Expand Down Expand Up @@ -55,7 +54,11 @@ Some presets use the `extends` property to hide some default options in a separa

### NPM Scope

Tells Nx what prefix to use when generating library imports.
The `npmScope` property of the `nx.json` file is deprecated as of version 16.2.0. `npmScope` was used as a prefix for the names of newly created projects. The new recommended way to define the organization prefix is to set the `name` property in the root `package.json` file to `@my-org/root`. Then `@my-org/` will be used as a prefix for all newly created projects.

In Nx 16, if the `npmScope` property is present, it will be used as a prefix. If the `npmScope` property is not present, the `name` property of the root `package.json` file will be used to infer the prefix.

In Nx 17, the `npmScope` property will be ignored.

### Affected

Expand Down

0 comments on commit afd3cfd

Please sign in to comment.