@nrwl/web:webpack
Builds web applications using webpack
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/configuration/projectjson#targets.
Options
baseHref
Base url for the application being built.
budgets
Budget thresholds to ensure parts of your application stay within boundaries which you set.
buildLibsFromSource
trueRead buildable libraries from source instead of building them separately.
crossOrigin
The crossorigin attribute to use for generated javascript script tags. One of 'none' | 'anonymous' | 'use-credentials'.
compiler
babelbabel, swcThe compiler to use.
commonChunk
trueUse a separate bundle containing code used across multiple bundles.
deleteOutputPath
trueDelete the output path before building.
deployUrl
URL where the application will be deployed.
extractCss
falseExtract CSS into a .css file.
es2015Polyfills
Conditional polyfills loaded in browsers which do not support ES2015.
extractLicenses
falseExtract all licenses in a separate file, in the case of production builds only.
generateIndexHtml
trueGenerates index.html file to the output path. This can be turned off if using a webpack plugin to generate HTML such as html-webpack-plugin.
index
HTML File which will be contain the application.
main
The name of the main entry-point file.
memoryLimit
2048Memory limit for type checking service process in MB.
maxWorkers
2Number of workers to use for type checking.
namedChunks
trueNames the produced bundles according to their entry file.
outputPath
The output path of the generated files.
outputHashing
nonenone, all, media, bundlesDefine the output filename cache-busting hashing mode.
progress
falseLog progress to the console while building.
polyfills
Polyfills to load before application
postcssConfig
Set a path to PostCSS config that applies to the app and all libs. Defaults to undefined, which auto-detects postcss.config.js files in each app/lib directory.
runtimeChunk
trueUse a separate bundle containing the runtime.
sourceMap
trueOutput sourcemaps. Use 'hidden' for use with error reporting tools without generating sourcemap comment.
scripts
External Scripts which will be included before the main application entry.
styles
External Styles which will be included with the application
subresourceIntegrity
falseEnables the use of subresource integrity validation.
statsJson
falseGenerates a 'stats.json' file which can be analyzed using tools such as: 'webpack-bundle-analyzer' or <https://webpack.github.io/analyse>.
tsConfig
The name of the Typescript configuration file.
vendorChunk
trueUse a separate bundle containing only vendor libraries.
verbose
falseEmits verbose output
watch
falseEnable re-building when files change.
webpackConfig
Path to a function which takes a webpack config, some context and returns the resulting webpack config.