@nrwl/node:webpack

Node application build target options for Build Facade.

Options can be configured in project.json when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/reference/project-configuration#targets.

Options

main

Required
string

The name of the main entry-point file.

tsConfig

Required
string

The name of the Typescript configuration file.

assets

Array<oneOf [object , string]>
Default: []

List of static application assets.

additionalEntryPoints

No description available.

buildLibsFromSource

boolean
Default: true

Read buildable libraries from source instead of building them separately.

deleteOutputPath

boolean
Default: true

Delete the output path before building.

externalDependencies

oneOf [string, Array<string>]
Default: all

Dependencies to keep external to the bundle. (all (default), none, or an array of module names)

extractLicenses

boolean
Default: false

Extract all licenses in a separate file, in the case of production builds only.

fileReplacements

Default: []

Replace files with other files in the build.

generatePackageJson

boolean
Default: false

Generates a package.json and pruned lock file with the project's node_module dependencies populated for installing in a container. If a package.json exists in the project's directory, it will be reused with dependencies populated.

maxWorkers

number

Number of workers to use for type checking. (defaults to # of CPUS)

memoryLimit

number
Default: 2048

Memory limit for type checking service process in MB. (defaults to 2048)

outputPath

string

The output path of the generated files.

optimization

boolean
Default: false

Defines the optimization level of the build.

outputFileName

string
Default: main.js

Name of the main output file. (defaults to main.js)

poll

number

Frequency of file watcher in ms.

progress

boolean
Default: false

Log progress to the console while building.

sourceMap

boolean
Default: true

Produce source maps.

statsJson

boolean
Default: false

Generates a stats.json file which can be analyzed using tools such as: webpack-bundle-analyzer or <https://webpack.github.io/analyse>.

transformers

Array<oneOf [string, object ]>
Default: []

List of TypeScript Compiler Transfomers Plugins.

verbose

boolean
Default: false

Emits verbose output

watch

boolean
Default: false

Run build when files change.

watchOptions

A set of options used to customize watch mode.

webpackConfig

oneOf [Array<string>, string]

Path to a function which takes a webpack config, context and returns the resulting webpack config. See https://nx.dev/guides/customize-webpack