@nx/next:custom-server

Add a custom server to existing Next.js application.

Examples

nx g custom-server my-app

Usage

1nx generate custom-server ... 2

By default, Nx will search for custom-server in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

1nx g @nx/next:custom-server ... 2
Nx 15 and lower use @nrwl/ instead of @nx/

Show what will be generated without writing to disk:

1nx g custom-server ... --dry-run 2

Options

project

pRequired
string

The name of the project.

compiler

string
Default: tsc
Accepted values: tsc, swc

The compiler used to build the custom server.