@nrwl/esbuild:esbuild-project

Add EsBuild Configuration to a project.

Usage

nx generate esbuild-project ...

By default, Nx will search for esbuild-project in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

nx g @nrwl/esbuild:esbuild-project ...

Show what will be generated without writing to disk:

nx g esbuild-project ... --dry-run

Examples

Add a build target to 'my-package' library.:

nx g @nrwl/esbuild:esbuild-project my-package

Add a build target with a custom npm import path.:

nx g @nrwl/esbuild:esbuild-project my-package --importPath=@acme/package

Add a build target with a custom main entry file.:

nx g @nrwl/esbuild:esbuild-project my-package --main=packages/my-package/custom-entry.ts

Options

importPath

string

The library name used to import it, like @myorg/my-awesome-lib.

main

entryFile
string

Path relative to the workspace root for the main entry file. Defaults to '<projectRoot>/src/main.ts'.

project

string

The name of the project.

skipFormat

boolean
Default: false

Skip formatting files.

skipPackageJson

boolean
Default: false

Do not add dependencies to package.json.

tsConfig

string

Path relative to the workspace root for the tsconfig file to build with. Defaults to '<projectRoot>/tsconfig.app.json'.