Skip to main content

Next Apps with NX

Refer to creating a Nextjs app with NX to get started.

Create New Apps

In an existing NX.dev workspace create a new app by running the following command:

npx nx g @nrwl/next:app [prefix-app-name]

For example

npx nx g @nrwl/next:app web3-uniswap

Configure TailwindCSS

After running nx generator for a new Next app setup Tailwindcss by copying files from an existing app.

  1. Copy Assets folder
  2. Copy tailwind.config
  3. Copy postcsss.config

Adjust base.css colour to trigger the JIT compiler so that styles will be applied.

Configure Tests

E2E Testing is setup out of the box

Run

npx nx serve [appName]