Add Another Application
Nx plugins usually provide generators that allow you to easily scaffold code, configuration or entire projects. To see what capabilities the @nx/react
plugin provides, run the following command and inspect the output:
nx list @nx/react
Run the following command to generate a new inventory
application. Note how we append --dry-run
to first check the output.
nx g @nx/react:app apps/inventory --dry-run
NX Generating @nx/react:application
✔ Would you like to add React Router to this application? (y/N) · false✔ What unit test runner should be used? · vitest✔ Which E2E test runner would you like to use? · none
As you can see, it generates a new application in the apps/inventory/
folder. Let’s actually run the generator by removing the --dry-run
flag.
nx g @nx/react:app apps/inventory
Files
Preparing Environment
- Stubbing git
- Installing dependencies