Skip to content

Commit 37bf9e9

Browse files
committed
docs(@angular/cli): add section on build command about build-optimizer and vendor-chunk
Fix #8586
1 parent fccedc8 commit 37bf9e9

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

docs/documentation/build.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,20 @@ Flag | `--dev` | `--prod`
8383
`--named-chunks`   | `true` | `false`
8484
`--build-optimizer` | `false` | `true` with AOT and Angular 5
8585

86-
`--extract-licenses` Extract all licenses in a separate file, in the case of production builds only.
87-
`--i18n-file` Localization file to use for i18n.
8886
`--prod` also sets the following non-flaggable settings:
8987
- Adds service worker if configured in `.angular-cli.json`.
9088
- Replaces `process.env.NODE_ENV` in modules with the `production` value (this is needed for some libraries, like react).
9189
- Runs UglifyJS on the code.
9290

91+
### `--build-optimizer` and `--vendor-chunk`
92+
93+
When using Build Optimizer the vendor chunk will be disabled by default.
94+
You can override this with `--vendor-chunk=true`.
95+
96+
Total bundle sizes with Build Optimizer are smaller if there is no separate vendor chunk because
97+
having vendor code in the same chunk as app code makes it possible for Uglify to remove more unused
98+
code.
99+
93100
### CSS resources
94101

95102
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.
377384
In a server build, state whether `all` or `none` dependencies should be bundles in the output.
378385
</p>
379386
</details>
387+
388+
389+
<details>
390+
<summary>extract-licenses</summary>
391+
<p>
392+
<code>--extract-licenses</code> <em>default value: true</<em>
393+
</p>
394+
<p>
395+
Extract all licenses in a separate file, in the case of production builds only.
396+
</p>
397+
</details>

0 commit comments

Comments
 (0)