Alan Agius
68227565ce
feat(@angular-devkit/build-angular): add crossorigin options
...
This options allows to define the crossorigin attribute setting of elements that provide CORS support
Closes #14743
2019-06-27 15:12:43 -07:00
Suguru Inatomi
4bfa4e0c06
fix(@angular-devkit/build-angular): add Symbol.iterator polyfill for legacy browsers
2019-06-27 09:26:31 -07:00
Alan
44a0d0fb4e
fix(@angular-devkit/build-angular): add type="module"
on script tags when differential loading will be enabled
...
Fixes #14747
2019-06-26 11:17:21 -07:00
Hans Larsen
a5afd7b2b6
fix(@angular-devkit/build-angular): force event category to be something
...
If it is empty (or undefined), the Universal Analytics package will not send events.
2019-06-25 13:25:23 -07:00
FDIM
af2b1b55dc
feat(@angular-devkit/build-angular): option to build and test only specified spec files
2019-06-24 17:27:25 -07:00
Alan
d43ca041e2
fix(@angular-devkit/build-angular): re-order reporters to set code coverage at the very end
2019-06-20 10:58:54 -07:00
Alan
10200f1395
fix(@angular-devkit/build-angular): remove certain redundant build steps from second build in differential loading
...
With this change we remove styles compilation and copying of assets for the second build when differential loading is enabled.
This should improve the build times for larger applications.
2019-06-19 17:08:25 -07:00
Alan Agius
0701afc31f
fix(@angular-devkit/build-angular): browser builder should not swollow error messages
...
Closes #14813
2019-06-19 17:07:53 -07:00
Alan
c7135fae35
fix(@angular-devkit/build-angular): browser builder should not swollow error messages
...
Closes #14813
2019-06-19 17:07:27 -07:00
Charles Lyding
0ed8de1e8a
refactor(@angular-devkit/build-angular): cleanup compatible Angular version check
2019-06-19 17:06:28 -07:00
Alan
be210778f4
fix(@angular-devkit/build-angular): emit warning when using extract-i18n in Ivy
...
i18n is not yet implemented in Ivy, we should emit a warning stating this and exit gracefully.
This also swaps the readTsConfig logic to use `@angular/compiler-cli` instead of `typescript`. This is needed because when parsing the tsconfig, typescript is not aware of `angularCompilerOptions` and will not merged them if they are at un upper level tsconfig file when using `extends`.
Closes #14225
2019-06-14 12:56:33 -07:00
istiti
d7a0a69f03
feat(@angular-devkit/build-angular): move milliseconds time audit at the end of console
...
In a project with a lot of lazy modules we need scroll console window to see Date - Hash - Time audit message.
This PR should keep Date - Hash - Time at the end on first `ng s` or `ng b` to see if first build just happend or not. On rebuild only Time is at the end which is most valuable
Before:
```
$ ng s
Date: 2019-06-04T14:41:49.775Z
Hash: 998791a06c755186a7dc
Time: 37700ms
chunk {0} 0.205d3a05f39f54abaf98.js () 26.3 kB [rendered]
chunk {1} 1.78ebb349f1f621ecc6dd.js () 85.3 kB [rendered]
chunk {2} 2.6999dce3fa088a3aa465.js () 33.9 kB [rendered]
chunk {3} 3.5532acdb300ef6741a51.js () 49.2 kB [rendered]
chunk {4} 4.2add4f56d22ab59d79c6.js () 56.9 kB [rendered]
...
chunk {137} 137.a15fd611c1c4b96d409a.js () 3.26 kB [rendered]
chunk {138} 138.c9e103d1056bb9d070e3.js () 2.94 kB [rendered]
chunk {139} 139.455c4ac2d85c520f1254.js () 3.17 kB [rendered]
chunk {140} 140.4ca3e4f5eccec58809be.js () 4.29 kB [rendered]
chunk {141} 141.c27def44603508d8df52.js () 2.37 kB [rendered]
chunk {common} common.b74eca2038a9b1b5f3e4.js (common) 39.7 kB [rendered]
chunk {main} main.db063f94924f162703a2.js (main) 163 kB [initial] [rendered]
chunk {polyfills} polyfills.4ac5e2c02b432e50dfda.js (polyfills) 295 kB [initial] [rendered]
chunk {polyfills-es5} polyfills-es5.5468c4e590607eea5bd4.js (polyfills-es5) 462 kB [initial] [rendered]
chunk {runtime} runtime.7381db3f14ba80dfec8f.js (runtime) 12.7 kB [entry] [rendered]
chunk {scripts} scripts.9a46a0e28dae0f11bffb.js (scripts) 20.3 kB [entry] [rendered]
chunk {styles} styles.e8c91b6de63cbd1ef1be.js (styles) 624 kB [initial] [rendered]
chunk {vendor} vendor.eccdafeabbb649d68877.js (vendor) 4.77 MB [initial] [rendered]
** Angular Live Development Server is listening on 0.0.0.0:80, open your browser on http://localhost:80/ **
i 「wdm」: Compiled successfully.
i 「wdm」: Compiling...
Date: 2019-06-04T14:41:54.313Z - Hash: 41c1ac04e7ee47d1f385 - Time: 1463ms
148 unchanged chunks
chunk {64} 64.ca3cef05dbfd71b73683.js () 36.2 kB [rendered]
chunk {runtime} runtime.629babcdb3b730464fa1.js (runtime) 12.7 kB [entry] [rendered]
i 「wdm」: Compiled successfully.
```
After:
```
$ ng serve
chunk {0} 0.205d3a05f39f54abaf98.js () 26.3 kB [rendered]
chunk {1} 1.78ebb349f1f621ecc6dd.js () 85.3 kB [rendered]
chunk {2} 2.6999dce3fa088a3aa465.js () 33.9 kB [rendered]
chunk {3} 3.5532acdb300ef6741a51.js () 49.2 kB [rendered]
chunk {4} 4.2add4f56d22ab59d79c6.js () 56.9 kB [rendered]
...
chunk {137} 137.a15fd611c1c4b96d409a.js () 3.26 kB [rendered]
chunk {138} 138.c9e103d1056bb9d070e3.js () 2.94 kB [rendered]
chunk {139} 139.455c4ac2d85c520f1254.js () 3.17 kB [rendered]
chunk {140} 140.4ca3e4f5eccec58809be.js () 4.29 kB [rendered]
chunk {141} 141.c27def44603508d8df52.js () 2.37 kB [rendered]
chunk {common} common.b74eca2038a9b1b5f3e4.js (common) 39.7 kB [rendered]
chunk {main} main.db063f94924f162703a2.js (main) 163 kB [initial] [rendered]
chunk {polyfills} polyfills.4ac5e2c02b432e50dfda.js (polyfills) 295 kB [initial] [rendered]
chunk {polyfills-es5} polyfills-es5.5468c4e590607eea5bd4.js (polyfills-es5) 462 kB [initial] [rendered]
chunk {runtime} runtime.b9d205421cbb4e61db70.js (runtime) 12.7 kB [entry] [rendered]
chunk {scripts} scripts.9a46a0e28dae0f11bffb.js (scripts) 20.3 kB [entry] [rendered]
chunk {styles} styles.e8c91b6de63cbd1ef1be.js (styles) 624 kB [initial] [rendered]
chunk {vendor} vendor.eccdafeabbb649d68877.js (vendor) 4.77 MB [initial] [rendered]
Date: 2019-06-04T14:14:33.560Z - Hash: 1690109f67cb887a6d5d - Time: 34676ms
** Angular Live Development Server is listening on 0.0.0.0:80, open your browser on http://localhost:80/ **
i 「wdm」: Compiled successfully.
i 「wdm」: Compiling...
Date: 2019-06-04T14:14:53.336Z - Hash: 998791a06c755186a7dc
148 unchanged chunks
chunk {64} 64.0bf728d7fbcbba217b53.js () 36.2 kB [rendered]
chunk {runtime} runtime.7381db3f14ba80dfec8f.js (runtime) 12.7 kB [entry] [rendered]
Time: 1411ms
i 「wdm」: Compiled successfully.
```
2019-06-14 09:50:29 -07:00
Alan Agius
4ad0fb73c3
fix(@angular-devkit/build-angular): always disable buildOptimizer
when extracting i18n
2019-06-12 14:54:15 -07:00
Alan Agius
32bae6dbd8
refactor: small refactor in AOT plugin file
2019-06-12 14:54:15 -07:00
Alan Agius
69e47c2249
fix(@angular-devkit/build-angular): browsers that partially support ES6 modules are being marked as not supported
...
`caniuse-api` only returns `true` for a feature when it's fully supported. This might causes redundant ES5 builds if users opt to support only browsers which do support ES6 modules but either require polyfills such as Safari 10.1 or when both bundles will be downloaded such as `Edge 18`
See: 1b74c10257/src/index.js (L49)
and https://github.com/Nyalab/caniuse-api/issues/82
Fixes #14580
2019-06-11 09:55:03 -07:00
Alan Agius
1dd399c4d2
fix(@angular-devkit/build-angular): nomodule polyfill for Safari
...
10.1 and iOS Safari 10.3
The nomodule polyfill needs to be loaded prior to any script and be
outside of webpack compilation because otherwise webpack will cause the
script to be wrapped in `window["webpackJsonp"]` which causes it to
fail.
This polyfill will only be injected when the either Safari 10.1 or iOS
Safari 10.3 support is required, which is based on the browsers defined in browserslist file.
Fixes #14680
2019-06-11 09:55:03 -07:00
Alan Agius
8828a7d271
fix(@angular-devkit/build-angular): re-order ES5 polyfills in karma HTMLs
...
Similar to the index HTML page (6ec09919b5/tests/legacy-cli/e2e/tests/misc/support-ie.ts (L30-L37)
) ES5 polyfills should be loaded prior to the other polyfills. This is because other polyfills such as `zone.js` require these for example `Symbol` and `Object.isFrozen`
Fixes #14618
2019-06-06 14:32:20 -07:00
Alan
6893fc1cdd
fix(@angular-devkit/build-angular): server build is generating un-needed polyfill file
...
Fixes #14655
2019-06-06 14:26:30 -07:00
Judy Bogart
7ef64dbe46
docs: more complete description
2019-06-06 14:06:53 -07:00
Judy Bogart
3ec845caf3
docs: make connection of live-reload and public-host explicit
2019-06-06 14:06:53 -07:00
Nick Webster
a976e45f8b
fix(@angular-devkit/build-angular): exclude map files from 'bundle' budgets
2019-05-30 14:05:59 -07:00
Alan
3a400c54cb
fix(@angular-devkit/build-angular): dev-server port number mismatches in logs when using port=0
...
Fixes #14499
2019-05-23 19:15:50 +02:00
Alan
b361a97abe
fix(@angular-devkit/build-angular): absolute outputPath outputs index.html in wrong location
...
Fixes #14474
2019-05-21 09:07:58 -04:00
Alan Agius
a7f2346e14
fix(@angular-devkit/build-angular): normalize sourceMap options in karma webpack plugin
...
`sourceMap` option can be either a boolean or an object,we need to normalize it before trying to get the `script` value.
Fixes #14457
2019-05-21 09:01:58 -04:00
Filipe Silva
74f2ee68d6
fix(@angular-devkit/build-angular): show error for missing modules
...
Fix #14421
2019-05-15 14:13:44 -07:00
Charles Lyding
56d6dc848b
refactor(@angular-devkit/build-angular): use standard node resolution methods where possible
2019-05-15 14:12:23 -07:00
Charles Lyding
06c1e1c051
refactor(@angular-devkit/build-angular): simplify webpack stats output
2019-05-15 14:12:13 -07:00
Alan
e333450dc0
feat(@angular-devkit/build-angular): add a post transformation hook to index generation
...
Fixes #14392
2019-05-14 10:51:56 -07:00
Charles Lyding
4f9ac220d8
refactor(@angular-devkit/build-angular): remove unused utility functions
2019-05-13 15:56:16 -07:00
Charles Lyding
68bc0c7bc1
fix(@angular-devkit/build-angular): extract i18n should only show warnings/errors
...
Fixes #14373
2019-05-10 15:08:10 -07:00
Alan Agius
cc8c3fd904
fix(@angular-devkit/build-angular): propagate protractor errors during execution
2019-05-09 10:11:56 -07:00
Charles Lyding
01247c9339
fix(@angular-devkit/build-angular): stop dev server fallback outside of serve path
...
The serve path represents the base of the application. Accessing a different path (`/api/` for instance) should not cause the application to load if the application's base is `/test/`
2019-05-09 10:11:05 -07:00
Charles Lyding
0b700c3c27
fix(@angular-devkit/build-angular): protractor should use dev server baseUrl
2019-05-09 10:10:33 -07:00
Charles Lyding
e3eee5fc91
fix(@angular-devkit/build-angular): account for dynamic port with dev-server baseUrl
...
The underlying webpack dev server builder is responsible for determining the actual port value for dynamic port cases (port = 0). This change uses that value to generate the full URL for accessing the dev server.
2019-05-09 10:10:33 -07:00
Filipe Silva
22e401b151
fix(@angular-devkit/build-angular): load polyfills-es5 on test
...
Fix #14335
2019-05-07 16:18:57 -06:00
Filipe Silva
888145e5a1
fix(@angular-devkit/build-angular): never split polyfill chunks
...
Fix #14280
2019-05-07 16:18:57 -06:00
Filipe Silva
a41c185713
fix(@angular-devkit/build-angular): relax typescript peerDep
...
We only use it for a few things but have a strict peerdep.
This strictness causes errors when updating the CLI from 7.x to 8.x projects:
```
Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.1.1 <3.2", would install "3.4.5").
```
`build-angular` did not have a peerdep in 7.x so this never was a problem.
This PR relaxes the peerdep to `">=3.1 < 3.5"`, which covers the 3.1 used in initial CLI 7.0 projects.
2019-05-07 16:16:46 -06:00
Filipe Silva
16c8d59d17
fix(@angular-devkit/build-angular): used named chunks for dynamic imports
...
Fix #14251
2019-05-07 16:14:13 -06:00
Alan Agius
16ce92d77a
fix(@angular-devkit/build-angular): e2e does not respect dev-server host and port settings ( #14165 )
...
Fixes #14151
2019-05-07 12:32:57 -06:00
Alan Agius
b2262e93c1
fix(@angular-devkit/build-angular): live reload cannot be disabled
...
By default the application will be served with inline mode enabled. This means that a script will be inserted in your bundle to take care of live reloading.
However at the moment we are already adding these scripts in `_addLiveReload` method.
With this change we always disable this behaviour and only add it when needed via the `_addLiveReload` logic.
Eventually we should try to remove the logic and rely on webpack-dev-server interals.
Fixes #14300
2019-04-29 10:33:09 -07:00
Kara
29609fb078
Merge pull request #14287 from kara/revert-pure-getters
...
Revert "fix(@angular-devkit/build-angular): remove pure_getters"
2019-04-26 12:13:59 -07:00
Charles Lyding
5b4b78bfbb
feat(@angular-devkit/build-angular): use evergreen version of zone.js with ES2015
2019-04-25 12:12:29 -07:00
Charles Lyding
e3a36c4d9f
fix(@angular-devkit/build-angular): skip version check if unit-testing
2019-04-25 10:23:25 -07:00
Charles Lyding
b7a26fa08b
fix(@angular-devkit/build-angular): add Angular version check into required builders
2019-04-25 10:23:25 -07:00
Filipe Silva
eec39a20c3
fix(@angular-devkit/build-angular): use known Terser global defs
...
Followup to https://github.com/angular/angular/pull/29929
2019-04-24 07:11:21 -10:00
Filipe Silva
9a9939fc4e
fix(@angular-devkit/build-angular): remove pure_getters
...
When we first started using Build Optimizer, we saw a lot of the savings were tied to using the Uglify/Terser `pure_getters` option.
This was intimately related with the structure and shape of the Angular codebase. The measurements we did at the time on angular.io showed a significant size reduction, from 1mb to about 600kb. Of these roughly 150kb were tied to using `pure_getters` if I remember correctly.
Meanwhile the Angular codebase has changed significantly and I don't really see these savings anymore, so I don't think it makes sense to keep it on given that it is known to cause problems with some libraries.
Closes #9231 , #11439 , #12096 , #12128 .
2019-04-24 07:11:21 -10:00
Filipe Silva
adf46c2bd5
fix(@angular-devkit/build-angular): pass system path to readTsconfig
2019-04-24 06:32:01 -10:00
Filipe Silva
0f9de92dcb
feat(@angular-devkit/build-angular): remove experimentalImportFactories option
...
It will just be always be used when applicable.
Fix #14218
2019-04-22 16:16:58 -07:00
Charles Lyding
74ec9110b0
refactor(@angular-devkit/build-angular): remove unused type
2019-04-22 13:37:46 -07:00
Minko Gechev
36be8cd42e
feat(@angular-devkit/build-angular): warn when target greater es2015
...
When using differential loading with targets ES5 and ES2016+, the
browser with ESM support will pick `script[type="module"]` scripts even
without supporting ES2016+ syntax.
We want to warn users in this case.
2019-04-22 11:32:48 -07:00