Angular 6 References/ CLI
References

Browser builder

This is the documentation for Angular 6.
You can switch to the latest version Angular 10.

ID: @angular-devkit/build-angular:browser

Options

--assets#

List of static application assets.
Type array

--main#

The name of the main entry-point file.
Type string

--polyfills#

The name of the polyfills file.
Type string

--tsConfig#

The name of the TypeScript configuration file.
Type string

--scripts#

Global scripts to be included in the build.
Type array

--styles#

Global styles to be included in the build.
Type array

--stylePreprocessorOptions#

Options to pass to style preprocessors.
Type object
Links & Tutorials

--optimization#

Defines the optimization level of the build.
Type boolean
Default false

--fileReplacements#

Replace files with other files in the build.
Type array
Links & Tutorials

--outputPath#

Path where output will be placed.
Type string

--aot#

Build using Ahead of Time compilation.
Type boolean

--sourceMap#

Output sourcemaps.
Type boolean
Default true

--evalSourceMap#

Output in-file eval sourcemaps.
Type boolean

--vendorChunk#

Use a separate bundle containing only vendor libraries.
Type boolean
Default true

--commonChunk#

Use a separate bundle containing code used across multiple bundles.
Type boolean
Default true

--baseHref#

Base URL for the application being built.

--deployUrl#

URL where files will be deployed.
Type string

--verbose#

Adds more details to output logging.
Type boolean

--progress#

Log progress to the console while building.
Type boolean
Default true

--i18nFile#

Localization file to use for i18n.
Type string

--i18nFormat#

Format of the localization file specified with `i18nFile`.
Type string

--i18nLocale#

Locale to use for i18n.
Type string

--i18nMissingTranslation#

How to handle missing translations for i18n.
Type string

--extractCss#

Extract css from global styles onto css files instead of js ones.
Type boolean
Default false

--watch#

Run build when files change.
Type boolean

--outputHashing#

Define the output filename cache-busting hashing mode.
Type string
Values none,all,media,bundles
Default none

--poll#

Enable and define the file watching poll time period in milliseconds.
Type number

--deleteOutputPath#

Delete the output path before building.
Type boolean
Default true
Do not use the real path when resolving modules.
Type boolean

--extractLicenses#

Extract all licenses in a separate file, in the case of production builds only.
Type boolean
Default true

--showCircularDependencies#

Show circular dependency warnings on builds.
Type boolean
Default true

--buildOptimizer#

Enables @angular-devkit/build-optimizer optimizations when using the 'aot' option.
Type boolean

--namedChunks#

Use file name for lazy loaded chunks.
Type boolean
Default true

--subresourceIntegrity#

Enables the use of [subresource integrity](https://www.maxcdn.com/one/visual-glossary/subresource-integrity/) validation.
Type boolean

--serviceWorker#

Generates a service worker config for production builds.
Type boolean

--skipAppShell#

Flag to prevent building an app shell.
Type boolean

--index#

The name of the index HTML file.
Type string

--statsJson#

Generates a 'stats.json' file which can be analyzed using tools such as: `#webpack-bundle-analyzer` or https://webpack.github.io/analyse.
Type boolean
Hint
View generated stats: * `npm install -g webpack-bundle-analyzer` * `webpack-bundle-analyzer dist/stats.json`
Links & Tutorials

--forkTypeChecker#

Run the TypeScript type checker in a forked process.
Type boolean
Default true

--lazyModules#

List of additional NgModule files that will be lazy loaded. Lazy router modules with be discovered automatically.
Type array

--budgets#

Budget thresholds to ensure parts of your application stay within boundaries which you set.
Type array