8 Commits

Author SHA1 Message Date
Shlang
98b4f421ab docs: fix typos 2017-11-02 15:52:13 +00:00
Filipe Silva
826c634090 feat(@angular/cli): add flag to control chunk naming
Followup to #6881

Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well.

Defaults to true in development, false in production.
2017-07-19 13:53:07 -04:00
James Ayvaz
36e4d7b4bb feat(@angular/cli): read proxyConfig from angular-cli.json
easy proxy config by reading default from angular-cli.json (#6240)
2017-07-05 11:45:52 -07:00
Filipe Silva
28e4114785 feat(@angular/cli): followup changes to circular dependency detection
Flag is now positive instead of negative and shorter, and can now be set on commands as well (`--show-circular-dependencies`).

Dependency was also added to eject as per https://github.com/angular/angular-cli/pull/6813#issuecomment-311567074.
2017-06-29 11:18:39 -07:00
Filipe Silva
1f3738b19f feat(@angular/cli): add circular dependency detection
Circular dependencies, like `app.module.ts` importing `app.component.ts` which in turn imports `app.module.ts`, now display a warning during builds:

```
kamik@T460p MINGW64 /d/sandbox/master-project (master)
$ ng build
Hash: 3516b252f4e32d6c5bb8
Time: 8693ms
chunk    {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 160 kB {4} [initial] [rendered]
chunk    {1} main.bundle.js, main.bundle.js.map (main) 5.95 kB {3} [initial] [rendered]
chunk    {2} styles.bundle.js, styles.bundle.js.map (styles) 10.5 kB {4} [initial] [rendered]
chunk    {3} vendor.bundle.js, vendor.bundle.js.map (vendor) 1.88 MB [initial] [rendered]
chunk    {4} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]

WARNING in Circular dependency detected:
src\app\app.module.ts -> src\app\app.component.ts -> src\app\app.module.ts

WARNING in Circular dependency detected:
src\app\app.component.ts -> src\app\app.module.ts -> src\app\app.component.ts
```

It is important to detect and eliminate circular dependencies because leaving them in might lead to `Maximum call stack size exceeded` errors, or imports being `undefined` at runtime.

To remove these warnings from your project you can factor out the circular dependency into a separate module.

For instance, if module A imports `foo` from module B, and module B imports `bar` from module A, it is enough to extract `foo` into module C.

You can turn off these warnings by running ng set apps.0.hideCircularDependencyWarnings=true. This will add the "hideCircularDependencyWarnings": true value to your .angular-cli.json and disable the warnings.

Fix #6309
Fix #6739
2017-06-27 16:30:30 +01:00
David Pertiller
da0c6c86a4 docs(@angular/cli): fix description for polyfills config (#6300) 2017-05-17 15:50:26 -04:00
Sumit Arora
47f50e8ca8 fix(@angular/cli): fixing type and adding link to documentation 2017-03-23 17:43:19 -07:00
Sumit Arora
446dc65a08 fix(@angular/cli): adding documentation for schema doc 2017-03-22 18:39:33 -07:00