61 Commits

Author SHA1 Message Date
Charles Lyding
78a180bb39 refactor(@angular/cli): remove unused source-map-loader dependency 2018-01-30 17:56:55 +00:00
Charles Lyding
eb102275bd feat(@angular/cli): optimize stylesheet resource processing 2018-01-25 13:19:45 +00:00
Hans Larsen
b1baa0c3a4 fix(@angular/cli): add karma-cli as dependency when ejecting 2018-01-24 16:35:57 -08:00
Charles Lyding
cfc58a0266 refactor(@angular/cli): simplify module resolution options 2018-01-24 11:52:18 -08:00
Hans Larsen
99d0a310a8 fix(@angular/cli): delete node_modules on eject e2e
And add missing dependenices when ejecting.
2018-01-24 08:06:08 -08:00
Hans Larsen
1b57f126fd fix(@angular/cli): eject now remove all hardcoded paths
In favor of process.cwd(). Also added a new eject e2e test that verifies
the webpack.config.js does NOT have the project path in it at any place.

Fixed #9335.
2018-01-24 07:47:15 -08:00
Mike Brocchi
66a376a0eb fix(@angular/cli): Remove testing log message. 2018-01-19 09:29:46 -08:00
Mike Brocchi
9c871b003a feat(@angular/cli): Ability to specify budgets for your apps
Closes #7139
2018-01-18 11:34:29 -08:00
Charles Lyding
f830a8d007 refactor(@angular/cli): use postcss to process CSS imports 2018-01-04 12:10:41 -05:00
Clemens Himmer
1c78ff1d2f fix(@angular/cli): license plugin config 2018-01-04 10:02:56 +00:00
Charles Lyding
6efd5b7746 feat(@angular/cli): optimize stylesheets after full bundling 2017-12-21 13:05:04 +00:00
Charles Lyding
a5edc12ee8 fix(@angular/cli): support eject with latest application schematic 2017-12-14 13:34:14 +00:00
Charles Lyding
8cea8ffdc2 refactor(@angular/cli): add webpack integrated scripts plugin 2017-12-13 17:09:17 -05:00
Alex Rickabaugh
abbd4a67d4 fix(@angular/cli): support ejection of service worker apps 2017-11-29 14:50:34 -08:00
Charles Lyding
a7f2e7fc60 fix(@angular/cli): use rxjs path mapping helper in ejected config 2017-11-20 09:06:12 -08:00
Hans Larsen
a24e644392 fix(@angular/cli): add PurifyPlugin to eject 2017-11-01 14:56:51 -07:00
Filipe Silva
a28a967309 fix(@angular/cli): remove typescript dependency 2017-10-25 10:32:57 -07:00
Filipe Silva
fd82e1870e build: update chalk to 2.2
`chalk@2.2` is incompatible with `@types/chalk`.
2017-10-24 12:03:55 -07:00
Filipe Silva
ecb91bed8f feat(@ngtools/webpack): add JIT support to AngularCompilerPlugin 2017-09-28 21:12:31 +01:00
Charles Lyding
977be3fa0c fix(@angular/cli): use relative paths within ejected config 2017-09-28 18:21:01 +01:00
Charles Lyding
8f73714a3a feat(@angular/cli): support subresource integrity validation 2017-09-26 16:27:30 +01:00
Filipe Silva
939cd6c02d feat(@ngtools/webpack): add AngularCompilerPlugin 2017-09-13 16:21:16 -07:00
Filipe Silva
dea04b1d57 feat(@angular/cli): support ES2015 target 2017-09-13 12:26:00 -07:00
Filipe Silva
38a7ab47c6 fix(@angular/cli): fix asset watching
https://github.com/kevlened/copy-webpack-plugin is now used instead of the custom plugin, it has since implemented the features we needed.

Fix #7521
2017-09-05 21:45:19 +01:00
Filipe Silva
e8f27f029a feat(@angular/cli): support sourcemaps and minification in scripts
Adds sourcemap and minification to javascript added via the `scripts` array in `.angular-cli.json`.

`script-loader` is no longer used, which should help with CSP since it used `eval`.

Scripts will no longer appear in the console output for `ng build`, as they are now assets instead of webpack entry points.

It's no longer possible to have the `output` property of both a `scripts` and a `styles` entry pointing to the same file. This wasn't officially supported or listed in the docs, but used to be possible.

Fix #2796
Fix #7226
Fix #7290

Related to #6872
2017-08-17 16:38:35 -04:00
Filipe Silva
505d69a13c feat(@angular/cli): update license-webpack-plugin
See https://github.com/xz64/license-webpack-plugin/issues/14, https://github.com/xz64/license-webpack-plugin/issues/13.

Fix #7203
2017-08-17 13:43:51 -04:00
christian.scharr
70cf514a28 fix(@angular/cli): exclude node_modules while take account for os specific path separators (#6870) 2017-07-31 22:51:41 +01:00
Christian Scharr
b32064f5d5 fix(@angular/cli): use relative path instead of regex to exclude node_modules (#6870) 2017-07-31 22:51:41 +01:00
Mike Brocchi
1c7e7bc66b fix(@angular/cli): Include missing dependency when ejecting 2017-07-31 14:40:27 +01:00
Charles Lyding
bf55bfd044 fix(@angular/cli): remove deprecated json-loader 2017-07-26 21:10:57 +01:00
FrozenPandaz
6f23636323 feat(@angular/cli): add ability to build bundle for node and export lazy route map 2017-07-20 15:01:25 -07:00
Michael Kühnel
35c89a5647 refactor: Change ejection message 2017-07-19 16:02:30 -04:00
Filipe Silva
fe85750cb7 feat(@angular/cli): add scope hoisting via webpack 3
This should result in significant bundle size reduction. For best results, build for production with `--vendor-chunk=false`.

See https://medium.com/webpack/webpack-3-official-release-15fd2dd8f07b for details.
2017-07-10 16:59:08 -07:00
Filipe Silva
5a0e80ffd3 feat(@angular/cli): name lazy chunks
Before:
```
$ ng build --no-progress
Hash: ff03df269349b817eef4
Time: 11202ms
chunk    {0} 0.chunk.js, 0.chunk.js.map 1.61 kB {1} {3} [rendered]
chunk    {1} 1.chunk.js, 1.chunk.js.map 1.46 kB {0} {3} [rendered]
chunk    {2} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 160 kB {6} [initial] [rendered]
chunk    {3} main.bundle.js, main.bundle.js.map (main) 6.38 kB {5} [initial] [rendered]
chunk    {4} styles.bundle.js, styles.bundle.js.map (styles) 10.5 kB {6} [initial] [rendered]
chunk    {5} vendor.bundle.js, vendor.bundle.js.map (vendor) 2.16 MB [initial] [rendered]
chunk    {6} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
```

After:
```
$ ng build --no-progress
Hash: 2bc12a89f40f3b4818b5
Time: 9613ms
chunk {feature.module} feature.module.chunk.js, feature.module.chunk.js.map 1.46 kB {lazy.module} {main} [rendered]
chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
chunk {lazy.module} lazy.module.chunk.js, lazy.module.chunk.js.map 1.61 kB {feature.module} {main} [rendered]
chunk {main} main.bundle.js, main.bundle.js.map (main) 6.38 kB {vendor} [initial] [rendered]
chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 160 kB {inline} [initial] [rendered]
chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 10.5 kB {inline} [initial] [rendered]
chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 2.16 MB [initial] [rendered]
```

Fix #6700
2017-07-05 14:50: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
jiverson
a8e4beba54 fix(@angular/cli): glob copy plugin config 2017-06-27 16:10:37 +01:00
Charles Lyding
bd0dac11aa fix(@angular/cli): correct sourcemap source paths 2017-06-15 13:50:35 -04:00
Sumit Arora
2be0bf2d53 fix(@angular/cli): fix delete path check 2017-06-07 11:22:25 -07:00
Sumit Arora
e72693a948 feat(@angular/cli): remove deduped licenses 2017-06-02 19:19:44 +01:00
Hans Larsen
9c7a7ea47b fix(@angular/cli): allow node_modules to be linked somewhere else.
Fixes #6499.
2017-05-31 10:59:22 -07:00
Filipe Silva
91cbe3375f refactor(@angular/cli): use this.project instead of cliProject 2017-05-24 13:39:30 -07:00
Filipe Silva
2b2e8b3685 fix(@angular/cli): remove broken script after eject
`prepree2e` doesn't run because it's a lifecycle script for a lifecycle script, but even if it did it would not work because there is nothing coordinating the serve and e2e processes.

Users must manually initialize the server prior to running e2e tests after ejecting.

Related to https://github.com/angular/angular-cli/issues/6171
2017-05-24 15:29:32 -04:00
Filipe Silva
b9f8ca648d fix(@angular/cli): put vendor ngfactory in vendor chunk
Currently vendor Angular libraries will have their *.ngfactory.ts in main.ts when building with `--aot`.

The easiest way to see this is with `source-map-explorer.

This PR correctly puts them in vendor.ts.
2017-05-17 16:16:28 -07:00
Tatsuyuki Ishi
3d9a7ff24d refactor(@angular/cli): use EnvironmentPlugin instead of DefinePlugin 2017-05-08 12:18:29 +01:00
Suguru Inatomi
8e2f8cf57b fix(@angular/cli): install webpack at ejection (#5745)
After ng eject, webpack package is not installed in the project, so npm run build requires global webpack installation.
2017-05-04 19:58:06 +01:00
Charles Lyding
b07f631773 feat(@angular/cli): always use named webpack modules in dev builds 2017-05-04 19:52:48 +01:00
Matt Martz
2a903d26fd fix(@angular/cli): enable dev server history fallback in ejected config 2017-04-11 16:33:50 -07:00
Charles Lyding
4563ec583a refactor(@angular/cli): modernize webpack style config
Close #5672
2017-03-29 11:04:09 +01:00
Hans
7461528b5f fix(@angular/cli): eject command removes EOF
Notably `package.json` and `tsconfig.json`.

Fixed #5387.
2017-03-13 09:00:00 -07:00