@nx/playwright:configuration

Add a Playwright configuration.

Usage

nx generate configuration ...

By default, Nx will search for configuration in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

nx g @nx/playwright:configuration ...
Nx 15 and lower use @nrwl/ instead of @nx/

Show what will be generated without writing to disk:

nx g configuration ... --dry-run

Options

project

Required
string

The project to add a Playwright configuration to.

directory

string
Default: e2e

A directory where the project is placed relative from the project root.

js

boolean
Default: false

Generate JavaScript files rather than TypeScript files.

linter

string
Default: eslint
Accepted values: eslint, none

The tool to use for running lint checks.

setParserOptionsProject

boolean
Default: false

Whether or not to configure the ESLint parserOptions.project option. We do not do this by default for lint performance reasons.

webServerCommand

string

The command to start the web server.

webServerAddress

string

The address of the web server.

skipFormat

boolean
Default: false

Skip formatting files.

skipPackageJson

boolean
Default: false

Do not add dependencies to package.json.