Nx used to have a workspace.json
file at the root of the repo that at various points performed these functions:
- Identified the locations of all project in the repo
- 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
Section titled “Removing workspace.json”To remove workspace.json
in favor of project.json
files, run:
nx g @nx/workspace:fix-configuration
See fix-configuration for more options.
After this command, workspace.json
should look like this:
{ "version": 2, "projects": { "my-app": "apps/my-app", "some-lib": "libs/some-lib" // ... }, "$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.