Before, the build tasks ran in parallel and so the different webpack
instances competed over the same lines on the console.
To fail fast and to prevent to show the same errors twice, the second
build step is not executed if the first one fails.
As running these tasks in sequence causes issues with watch mode, this
PR also disables differential loading when watch mode is requested.
This is to align with the folder structure of version 8, were tsconfigs are outside of the `src` folder
Also, this change remove the dud `tsconfig.json` in the `src` folder and instead we add the triple slash lib reference `/// <reference lib="webworker" />` for IDE support.
This PR adds differential loading to the browser builder. First, it checks if differential loading is needed. This is the case if the compilation target is ES2015 while the browserslist points to ES5 browsers.
For providing differential loading, it calls the methods for creating the webpack config for each compilation target (e. g. ES5 and ES2015). The needed differences between those configurations are defined using parameters also added by this PR. Then it calls webpack for each of them and merges the results
This feature is currently hidden behind a flag. To activate it, set the differentialLoading flag in browser/index.ts.
At the moment when `font` shorthand property is used a warning is emitted when using this syntax
```
font: 10px "Font Awesome";
```
This should be addressed by clean-css
Fixes#9648
Tslint 5.13+ introduced an addition parameter for the format method, mainly used for check-style formatter.
During runtime users using an older version of tslint that doesn't expose this it is not a problem as this parameter will be ignored.
See: 9000479b69
With directTemplateLoading enabled, components
can now use .svg files as templates. For AOT builds,
the Angular compiler host now reads .svg files
directly when reading component templates.
For JIT builds, replaceResources creates a require call
that directly uses raw-loader instead of using the
loader provided by the current webpack configuration.
Closes#10567
Remove the manually maintained schema.d.ts from the browser builder, and use
the Schema JSON file to generate it. This had a lot of repercussions around
the whole build-angular code base and the different interfaces that were
manually kept.
BREAKING CHANGE:
Root relative URLs are a standardized method to reference a resource path from the root of a host. The previous behavior of the Angular CLI prevented this from occuring and resulted in an inability to reference stylesheet assets in this manner. The initial reason for this behavior is no longer present in the internal implementation of the Angular CLI. Therefore, this now unnecessary and non-standard behavior is being phased out. If an application currently relies on this behavior, a compatibility option `rebaseRootRelativeCssUrls` has been provided for the 8.x release cycle to facilitate transition away from this non-standard and limiting behavior. The recommended method to transition is to use relative paths within the source stylesheet. This allows the build system to process and generate a full URL for the asset.
At the moment, if a user provides multiple tsconfig, a file needs to be part of all compilations as otherwise it will fail.
This PR changes this behavour and as long as it's in one of the compilations it will not error out.
Fixes#13399