Nx used to have a workspace.json file at the root of the repo that at various points performed these functions:

  1. Identified the locations of all project in the repo
  2. Contained the target configuration for all projects

Identifying the locations of projects is now done automatically through project inference. You can even customize how projects are inferred with a project inference plugin.

The target configuration for each project is now stored in individual project.json files or package.json files.

Removing workspace.json

To remove workspace.json in favor of project.json files, run:

nx g @nrwl/workspace:convert-to-nx-project --all

See convert-to-nx-project for more options.

After this command, workspace.json should look like this:

2  "version": 2,
3  "projects": {
4    "my-app": "apps/my-app",
5    "some-lib": "libs/some-lib"
6    // ...
7  },
8  "$schema": "./node_modules/nx/schemas/workspace-schema.json"

If every project is listed as a string, instead of an object with project configuration properties, then it is safe to delete the workspace.json file.