3
3
# ng build
4
4
5
5
## Overview
6
- ` ng build ` compiles the application into an output directory
6
+ ` ng build ` compiles the application into an output directory.
7
7
8
8
### Creating a build
9
9
@@ -132,7 +132,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
132
132
<details >
133
133
<summary >prod</summary >
134
134
<p >
135
- <code>--prod</code>
135
+ <code>--prod</code>
136
136
</p >
137
137
<p >
138
138
Flag to set configuration to "prod".
@@ -141,7 +141,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
141
141
<details >
142
142
<summary >configuration</summary >
143
143
<p >
144
- <code>--configuration</code> (alias: <code>-c</code>)
144
+ <code>--configuration</code> (alias: <code>-c</code>)
145
145
</p >
146
146
<p >
147
147
Specify the configuration to use.
@@ -150,7 +150,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
150
150
<details >
151
151
<summary >main</summary >
152
152
<p >
153
- <code>--main</code>
153
+ <code>--main</code>
154
154
</p >
155
155
<p >
156
156
The name of the main entry-point file.
@@ -159,7 +159,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
159
159
<details >
160
160
<summary >polyfills</summary >
161
161
<p >
162
- <code>--polyfills</code>
162
+ <code>--polyfills</code>
163
163
</p >
164
164
<p >
165
165
The name of the polyfills file.
@@ -168,7 +168,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
168
168
<details >
169
169
<summary >ts-config</summary >
170
170
<p >
171
- <code>--ts-config</code>
171
+ <code>--ts-config</code>
172
172
</p >
173
173
<p >
174
174
The name of the TypeScript configuration file.
@@ -177,7 +177,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
177
177
<details >
178
178
<summary >optimization</summary >
179
179
<p >
180
- <code>--optimization</code>
180
+ <code>--optimization</code>
181
181
</p >
182
182
<p >
183
183
Defines the optimization level of the build.
@@ -186,7 +186,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
186
186
<details >
187
187
<summary >output-path</summary >
188
188
<p >
189
- <code>--output-path</code>
189
+ <code>--output-path</code>
190
190
</p >
191
191
<p >
192
192
Path where output will be placed.
@@ -195,7 +195,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
195
195
<details >
196
196
<summary >aot</summary >
197
197
<p >
198
- <code>--aot</code>
198
+ <code>--aot</code>
199
199
</p >
200
200
<p >
201
201
Build using Ahead of Time compilation.
@@ -204,7 +204,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
204
204
<details >
205
205
<summary >source-map</summary >
206
206
<p >
207
- <code>--source-map</code>
207
+ <code>--source-map</code>
208
208
</p >
209
209
<p >
210
210
Output sourcemaps.
@@ -213,7 +213,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
213
213
<details >
214
214
<summary >eval-source-map</summary >
215
215
<p >
216
- <code>--eval-source-map</code>
216
+ <code>--eval-source-map</code>
217
217
</p >
218
218
<p >
219
219
Output in-file eval sourcemaps.
@@ -222,7 +222,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
222
222
<details >
223
223
<summary >vendor-chunk</summary >
224
224
<p >
225
- <code>--vendor-chunk</code>
225
+ <code>--vendor-chunk</code>
226
226
</p >
227
227
<p >
228
228
Use a separate bundle containing only vendor libraries.
@@ -231,7 +231,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
231
231
<details >
232
232
<summary >common-chunk</summary >
233
233
<p >
234
- <code>--common-chunk</code>
234
+ <code>--common-chunk</code>
235
235
</p >
236
236
<p >
237
237
Use a separate bundle containing code used across multiple bundles.
@@ -240,7 +240,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
240
240
<details >
241
241
<summary >base-href</summary >
242
242
<p >
243
- <code>--base-href</code>
243
+ <code>--base-href</code>
244
244
</p >
245
245
<p >
246
246
Base url for the application being built.
@@ -249,7 +249,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
249
249
<details >
250
250
<summary >deploy-url</summary >
251
251
<p >
252
- <code>--deploy-url</code>
252
+ <code>--deploy-url</code>
253
253
</p >
254
254
<p >
255
255
URL where files will be deployed.
@@ -258,7 +258,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
258
258
<details >
259
259
<summary >verbose</summary >
260
260
<p >
261
- <code>--verbose</code>
261
+ <code>--verbose</code>
262
262
</p >
263
263
<p >
264
264
Adds more details to output logging.
@@ -267,7 +267,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
267
267
<details >
268
268
<summary >progress</summary >
269
269
<p >
270
- <code>--progress</code>
270
+ <code>--progress</code>
271
271
</p >
272
272
<p >
273
273
Log progress to the console while building.
@@ -276,7 +276,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
276
276
<details >
277
277
<summary >i18n-file</summary >
278
278
<p >
279
- <code>--i18n-file</code>
279
+ <code>--i18n-file</code>
280
280
</p >
281
281
<p >
282
282
Localization file to use for i18n.
@@ -285,7 +285,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
285
285
<details >
286
286
<summary >i18n-format</summary >
287
287
<p >
288
- <code>--i18n-format</code>
288
+ <code>--i18n-format</code>
289
289
</p >
290
290
<p >
291
291
Format of the localization file specified with --i18n-file.
@@ -294,7 +294,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
294
294
<details >
295
295
<summary >i18n-locale</summary >
296
296
<p >
297
- <code>--i18n-locale</code>
297
+ <code>--i18n-locale</code>
298
298
</p >
299
299
<p >
300
300
Locale to use for i18n.
@@ -303,7 +303,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
303
303
<details >
304
304
<summary >i18n-missing-translation</summary >
305
305
<p >
306
- <code>--i18n-missing-translation</code>
306
+ <code>--i18n-missing-translation</code>
307
307
</p >
308
308
<p >
309
309
How to handle missing translations for i18n.
@@ -312,7 +312,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
312
312
<details >
313
313
<summary >extract-css</summary >
314
314
<p >
315
- <code>--extract-css</code>
315
+ <code>--extract-css</code>
316
316
</p >
317
317
<p >
318
318
Extract css from global styles onto css files instead of js ones.
@@ -321,7 +321,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
321
321
<details >
322
322
<summary >watch</summary >
323
323
<p >
324
- <code>--watch</code>
324
+ <code>--watch</code>
325
325
</p >
326
326
<p >
327
327
Run build when files change.
@@ -330,7 +330,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
330
330
<details >
331
331
<summary >output-hashing</summary >
332
332
<p >
333
- <code>--output-hashing</code>
333
+ <code>--output-hashing</code>
334
334
</p >
335
335
<p >
336
336
Define the output filename cache-busting hashing mode.
@@ -339,7 +339,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
339
339
<details >
340
340
<summary >poll</summary >
341
341
<p >
342
- <code>--poll</code>
342
+ <code>--poll</code>
343
343
</p >
344
344
<p >
345
345
Enable and define the file watching poll time period in milliseconds.
@@ -348,7 +348,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
348
348
<details >
349
349
<summary >delete-output-path</summary >
350
350
<p >
351
- <code>--delete-output-path</code>
351
+ <code>--delete-output-path</code>
352
352
</p >
353
353
<p >
354
354
Delete the output path before building.
@@ -357,7 +357,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
357
357
<details >
358
358
<summary >preserve-symlinks</summary >
359
359
<p >
360
- <code>--preserve-symlinks</code>
360
+ <code>--preserve-symlinks</code>
361
361
</p >
362
362
<p >
363
363
Do not use the real path when resolving modules.
@@ -366,7 +366,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
366
366
<details >
367
367
<summary >extract-licenses</summary >
368
368
<p >
369
- <code>--extract-licenses</code>
369
+ <code>--extract-licenses</code>
370
370
</p >
371
371
<p >
372
372
Extract all licenses in a separate file, in the case of production builds only.
@@ -375,7 +375,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
375
375
<details >
376
376
<summary >show-circular-dependencies</summary >
377
377
<p >
378
- <code>--show-circular-dependencies</code>
378
+ <code>--show-circular-dependencies</code>
379
379
</p >
380
380
<p >
381
381
Show circular dependency warnings on builds.
@@ -384,7 +384,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
384
384
<details >
385
385
<summary >build-optimizer</summary >
386
386
<p >
387
- <code>--build-optimizer</code>
387
+ <code>--build-optimizer</code>
388
388
</p >
389
389
<p >
390
390
Enables @angular-devkit/build-optimizer optimizations when using the 'aot' option.
@@ -393,7 +393,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
393
393
<details >
394
394
<summary >named-chunks</summary >
395
395
<p >
396
- <code>--named-chunks</code>
396
+ <code>--named-chunks</code>
397
397
</p >
398
398
<p >
399
399
Use file name for lazy loaded chunks.
@@ -402,7 +402,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
402
402
<details >
403
403
<summary >subresource-integrity</summary >
404
404
<p >
405
- <code>--subresource-integrity</code>
405
+ <code>--subresource-integrity</code>
406
406
</p >
407
407
<p >
408
408
Enables the use of subresource integrity validation.
@@ -411,7 +411,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
411
411
<details >
412
412
<summary >service-worker</summary >
413
413
<p >
414
- <code>--service-worker</code>
414
+ <code>--service-worker</code>
415
415
</p >
416
416
<p >
417
417
Generates a service worker config for production builds.
@@ -420,7 +420,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
420
420
<details >
421
421
<summary >ngsw-config-path</summary >
422
422
<p >
423
- <code>--ngsw-config-path</code>
423
+ <code>--ngsw-config-path</code>
424
424
</p >
425
425
<p >
426
426
Path to ngsw-config.json.
@@ -429,7 +429,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
429
429
<details >
430
430
<summary >skip-app-shell</summary >
431
431
<p >
432
- <code>--skip-app-shell</code>
432
+ <code>--skip-app-shell</code>
433
433
</p >
434
434
<p >
435
435
Flag to prevent building an app shell.
@@ -438,7 +438,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
438
438
<details >
439
439
<summary >index</summary >
440
440
<p >
441
- <code>--index</code>
441
+ <code>--index</code>
442
442
</p >
443
443
<p >
444
444
The name of the index HTML file.
@@ -447,7 +447,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
447
447
<details >
448
448
<summary >stats-json</summary >
449
449
<p >
450
- <code>--stats-json</code>
450
+ <code>--stats-json</code>
451
451
</p >
452
452
<p >
453
453
Generates a 'stats.json' file which can be analyzed using tools such as: #webpack-bundle-analyzer' or https: //webpack.github.io/analyse.
@@ -456,7 +456,7 @@ See https://github.com/angular/angular-cli/issues/7797 for details.
456
456
<details >
457
457
<summary >fork-type-checker</summary >
458
458
<p >
459
- <code>--fork-type-checker</code>
459
+ <code>--fork-type-checker</code>
460
460
</p >
461
461
<p >
462
462
Run the TypeScript type checker in a forked process.
0 commit comments