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:

Terminal window
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.

Terminal window
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.

Terminal window
nx g @nx/react:app apps/inventory
Powered by WebContainers
Files
Preparing Environment
  • Stubbing git
  • Installing dependencies