From a27d25f536305a91576dcd75dab13312431ac6ef Mon Sep 17 00:00:00 2001
From: Filipe Silva
Date: Thu, 23 Nov 2017 11:30:20 +0000
Subject: [PATCH] docs(@angular/cli): add section on build command about
build-optimizer and vendor-chunk
Fix #8586
---
docs/documentation/build.md | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/docs/documentation/build.md b/docs/documentation/build.md
index 2aa151aff024..6fb166b1f676 100644
--- a/docs/documentation/build.md
+++ b/docs/documentation/build.md
@@ -83,13 +83,20 @@ Flag | `--dev` | `--prod`
`--named-chunks` | `true` | `false`
`--build-optimizer` | `false` | `true` with AOT and Angular 5
-`--extract-licenses` Extract all licenses in a separate file, in the case of production builds only.
-`--i18n-file` Localization file to use for i18n.
`--prod` also sets the following non-flaggable settings:
- Adds service worker if configured in `.angular-cli.json`.
- Replaces `process.env.NODE_ENV` in modules with the `production` value (this is needed for some libraries, like react).
- Runs UglifyJS on the code.
+### `--build-optimizer` and `--vendor-chunk`
+
+When using Build Optimizer the vendor chunk will be disabled by default.
+You can override this with `--vendor-chunk=true`.
+
+Total bundle sizes with Build Optimizer are smaller if there is no separate vendor chunk because
+having vendor code in the same chunk as app code makes it possible for Uglify to remove more unused
+code.
+
### CSS resources
Resources in CSS, such as images and fonts, will be copied over automatically as part of a build.
@@ -377,3 +384,14 @@ Note: service worker support is experimental and subject to change.
In a server build, state whether `all` or `none` dependencies should be bundles in the output.
+
+
+
+ extract-licenses
+
+ --extract-licenses
default value: true
+
+
+ Extract all licenses in a separate file, in the case of production builds only.
+
+