@nx/workspace:fix-configuration

Migrates v1 config to v2 standalone configuration.

Usage

nx generate fix-configuration ...
nx g convert-to-nx-project ... #same

By default, Nx will search for fix-configuration in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

nx g @nx/workspace:fix-configuration ...
Nx 15 and lower use @nrwl/ instead of @nx/

Show what will be generated without writing to disk:

nx g fix-configuration ... --dry-run

Examples

Convert the my-feature-lib project to use project.json file instead of workspace.json:

nx g @nx/workspace:convert-to-nx-project --project my-feature-lib
Nx 15 and lower use @nrwl/ instead of @nx/

Convert all projects in workspace.json to separate project.json files:

nx g @nx/workspace:convert-to-nx-project --all
Nx 15 and lower use @nrwl/ instead of @nx/

Options

all

boolean

Convert all projects

project

string

Convert a single project

reformat

boolean

Just reformats the configuration

skipFormat

boolean
Default: false

Skip formatting files