project.json:

{ "name": "mobile", //... "targets": { //... "start": { "executor": "@nx/react-native:start", "options": { "port": 8081 } } } }
Nx 15 and lower use @nrwl/ instead of @nx/
nx run mobile:start

Examples

The interactive option allows you to specify whether to use interactive mode:

"start": { "executor": "@nx/react-native:start", "options": { "port": 8081, "interactive": false } }
Nx 15 and lower use @nrwl/ instead of @nx/

Options

interactive

boolean
Default: true

Run packager server in interactive mode.

port

number
Default: 8081

The port to listen on.

resetCache

boolean
Default: false

Resets metro cache.