257 Commits

Author SHA1 Message Date
Alan Agius
4d2ef2bf57 feat(@angular-devkit/build-angular): add support for i18n extraction with Ivy (#15796)
Re-enable i18n extraction in Ivy by using the legacy VE compiler.
2019-10-09 11:04:48 -07:00
Alan
fb0a6af9f0 fix(@angular-devkit/build-angular): make app-shell work with Ivy
Fixes #15383
2019-09-10 10:01:50 -07:00
noeri
366e51be04 feat(@angular-devkit/build-angular): expose webpack-dev-server's allowedHosts option
Closes #13656
2019-09-09 14:09:58 -07:00
Alan Agius
2c8b12f45c feat(@angular-devkit/build-angular): update sass-loader to 8.0.0
Full list of changes https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md#800-2019-08-29
2019-09-05 00:24:32 +05:30
Filipe Silva
6a29ce47a1 test: add issue for broken app-shell test 2019-08-30 22:53:46 +05:30
Filipe Silva
ecc9d0e2b5 test: update server builder specs 2019-08-30 22:53:46 +05:30
Filipe Silva
77cb0d3f41 test: add issue for disabled Ivy AOT rebuild test 2019-08-30 22:53:46 +05:30
Filipe Silva
430e75978a test: re-enable lazy route error tests for Ivy 2019-08-30 22:53:46 +05:30
Filipe Silva
45155dc489 test: fix external source map test for Ivy 2019-08-30 22:53:46 +05:30
Alan Agius
dffa70affa test: refactor karma include spec
disable index of failing test and remove timeout which is less than the default
2019-08-30 00:11:14 +05:30
Filipe Silva
60f9b19ecd test: use Ivy by default, opt-in to VE 2019-08-28 22:54:52 +05:30
Alan Agius
09d2f04d1b fix(@angular-devkit/build-angular): update worker-plugin to 3.2.0 (#15456)
includes this fix https://github.com/GoogleChromeLabs/worker-plugin/pull/35 which solves the below issues.

Fixes #15188 and fixes #14582
2019-08-28 00:10:26 -07:00
Charles Lyding
2e4cae172e test: remove additional usages of experimental workspaces 2019-08-16 09:32:04 -07:00
Alan Agius
f2ecb904a9 fix(@angular-devkit/build-angular): serve option merging is being overridden by defaults in schema (#15328)
We have a number of browser options that we allow the dev-server to merge. However, this only happens when such as options are undefined from the dev-server builder. At the moment these option have defaults inside their schema which results in them never being `undefined`, and hence the overridden logic is bypassed.

See: 6dd5b186d4/packages/angular_devkit/build_angular/src/dev-server/index.ts (L49-L63) and 6dd5b186d4/packages/angular_devkit/build_angular/src/dev-server/index.ts (L107-L115)

Fixes #15273 and fixes #15064
2019-08-14 17:55:04 -07:00
Alan Agius
0111693271 Ivy build_ng_packagr (#15262)
* test: update ng-packagr builder tests to work on Windows

* build: add ng packagr test large for ivy

* test: fix web-worker test in ivy

Previously, we were not testing web workers under Ivy as we were overriding tsconfig.app.json entirely without including enableIvy.

When enabling Ivy we are getting warning of files that are part of the compilation which causing a warning to show and break the test.

* build: update ng-packagr to `^5.4.0`

* test: display ivy mode message once
2019-08-12 10:20:02 -07:00
Charles Lyding
1c6f665c4f feat(@angular-devkit/build-angular): implement bundle level downleveling to support differential loading 2019-08-08 08:26:15 -07:00
Alan Agius
9478ee9c47 fix(@ngtools/webpack): gracefully show error when compiling broken component styles
Fixes #15240
2019-08-05 18:01:53 -07:00
Alan Agius
f4be0ba677 fix(@ngtools/webpack): display unused file warning once per file 2019-08-05 18:00:13 -07:00
Alan Agius
607e6f7cfd test: increase/add debounceTime to reduce flakiness 2019-07-29 15:06:10 -07:00
vikerman
07780b9272 style: clean up existing lint errors 2019-07-24 23:28:49 -07:00
Alan
6649483d86 fix(@ngtools/webpack): delete all virtual files for styles on change
Fixes #15143
2019-07-24 19:07:10 -07:00
Alan
0224d2b92e fix(@angular-devkit/build-angular): fix sourcemaps for vscode breakpoints
`namespace` is always empty which is breaking sourcemaps since when sources start with `/` vscode will not be able to resolve them unless users configure `sourceMapPathOverrides`.

Fixes #15116
2019-07-24 19:05:43 -07:00
Alan
bcf250c94d feat(@angular-devkit/build-angular): add bundle budget for component styles
It’s very easy to inadvertently import toplevel css in component styles. Since component css is standalone and self-contained, it will never be shared between components and remains as a single large bundle for each component. This in turn adds a large amount of code that must be processed and increases bundle size.

Related to: TOOL-949
2019-07-24 19:05:00 -07:00
Alan
28bd5493a7 fix(@ngtools/webpack): retain child compilation warnings and errors
At the moment child compilation warnings and errors are being lost as they are not passed to the root compilation.  This means that any errors that are being set by clean-css for component styles are being lost.
2019-07-24 19:05:00 -07:00
Alan Agius
4f8e349033 fix(@angular-devkit/build-angular): only add module script types to actual module scripts
Fixes #15102
2019-07-24 19:04:31 -07:00
Alan Agius
63f0049e43 feat(@ngtools/webpack): show warning when a TS compilations contains unused files
When a tsconfig without `includes` or `files` all files under the `rootDir` will be included in the compilation. This results in redundant files to inserted as part of the ts compilation which in some cases might reduce the compilation drastically.

Related to: TOOL-949
2019-07-24 19:03:35 -07:00
Charles
6d4f8a249c test: remove material-design-icons package as a development dependency (#15096)
The package is quite large at 33MB (46MB on disk).  The package is also only used in one test that is already covered by an E2E test.  The E2E test does not require the package to be present for development as the test installs it within a generated project during execution.  This also has the benefit of testing the icons package in a more real world use case; as well as allowing the test to serve as a guide for a user to add the package to their own application.
2019-07-16 14:41:59 -07:00
Alan Agius
0551360035 fix(@schematics/angular): exclusively list the files in tsconfigs (#15030)
* test: update tests to work with new stricter tsconfig file inclusions

* fix(@schematics/angular): exclusively list the files in tsconfigs

With the omission of `includes` or `files` in tsconfig files tsc will pick up all the files under the rootDir and make them as part of the compilation. In certain cases, redundant files will be picked up which will cause a slower compilations.

Related to: TOOL-949
2019-07-16 11:04:29 -07:00
Charles
f8a58213eb feat(@angular-devkit/build-angular): add defer attributes to classic scripts (#15087)
This change synchronizes the behavior of classic scripts and module scripts (`type="module"`).  Module scripts are deferred by default.  Also, certain injected scripts are not considered module scripts even in a ES2015+ build due to the strict mode behavior of module scripts.  Deferring such scripts also ensures consistent execution in those scenarios.
2019-07-16 09:58:19 -07:00
Alan
885005241e build: update webpack to version 4.35.3 2019-07-11 01:21:18 +08:00
Charles Lyding
8e97df3888 feat(@angular-devkit/build-angular): allow control of index output path
This allows the output path of an application's index HTML file to be controlled independently of the input file.  The output path for the file will be considered relative to the application's configured output path.  This allows an application to contain multiple input index files for different configurations and allow the output file to remain constant.  This also enables the placement of the index file in a subdirectory within the output path or change the name of the output index file neither of which was previously possible.
2019-07-10 04:34:20 +08:00
Alan Agius
86266a39fa fix(@ngtools/webpack): resources path normalizations
Compiler host `readResource` is always called with POSIX seperators. However the `denormalizePath` method doesn't convert forward slashes to back slashes which causes `getModifiedResourceFiles` to return an empty `Set`.

We were also assuming that `_changedFiles` is an FS path which was not the case as it's original type is `Path`

Fix #15012
2019-07-10 04:17:05 +08:00
Charles Lyding
f6953f0123 fix(@angular-devkit/build-angular): only add module script types to actual module scripts
`ng serve` was errantly adding a module type to custom script bundles.  These scripts may contain ES5 and non-strict compatible code and can therefore not be marked as module scripts.  `ng build` already correctly operates in this fashion.

Fixes #14952
2019-07-10 04:13:43 +08:00
Alan
2b367be1c3 feat(@angular-devkit/build-angular): deprecate scripts and styles lazy option in favor ofinject
The lazy option inside the script and style option is confusing as this option doesn't lazy load a bundle but rather it doesn't inject/reference the script in the HTML. While this option is an enabler for lazy loading, the users will still need to handle on how how this bundle will be lazy loaded. There are also potential use cases beyond lazy loading for the option.

Closes #14814
2019-07-02 11:05:51 -07:00
Charles Lyding
99fa7bd71f test: add initial ivy large test support 2019-07-02 10:04:09 -07:00
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
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
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 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
473b4c4a5a test: fix flakes of rebuilds TS worker
Not quite sure why such a long 'debounceTime' is needed anything under `2500` is a constant failure locally and this is also rather flaky on CI when it doesn't run as the first test.

It seems that the outputted files contents don't get updated in time.
2019-06-11 09:54:14 -07:00
Filipe Silva
819892a359 ci: remove appveyor and buildkite 2019-06-06 16:02:17 -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
Alan
e3bb367db1 fix(@ngtools/webpack): rebuilding project with errors reports cannot find .ts files in JIT
When the first build in JIT has an error we are not emitting files. This ends up causing an issue because subsequent builds only trigger partial emits of files and only emits the full set of files if the number of files changed is greater than 20.

This logic adds the behavior that we only enter the 'only 20 files' part when the previous build was successful.

Fixes #14644
2019-06-06 14:25:40 -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
Filipe Silva
74f2ee68d6 fix(@angular-devkit/build-angular): show error for missing modules
Fix #14421
2019-05-15 14:13:44 -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
68bc0c7bc1 fix(@angular-devkit/build-angular): extract i18n should only show warnings/errors
Fixes #14373
2019-05-10 15:08:10 -07:00