444 Commits

Author SHA1 Message Date
Alan Agius
320273af5a feat(@angular-devkit/build-angular): add support for tslint 5.13+
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
2019-03-06 11:28:37 -08:00
Hans Larsen
61adf9ae35 refactor(@angular-devkit/build-angular): remove useless variable rename 2019-03-06 10:05:31 -08:00
Hans Larsen
e8dab635ff feat(@angular-devkit/build-angular): add Browser Builder v2
It exposes a lot of functions that can be reused to run webpack with
different config, so third party builders can reuse those.
2019-03-05 11:14:59 -08:00
Mathias Raacke
dfb08b95b7 feat(@ngtools/webpack): allow .svg files as templates
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
2019-03-05 10:16:41 -08:00
Charles Lyding
2f4602db08 feat(@angular-devkit/build-angular): change es5BrowserSupport output filename to polyfills.es5.js
Closes #13808
2019-03-04 09:36:00 -08:00
Alan Agius
70b28193c9 fix(@angular-devkit/build-angular): sourceMap option not working in tests
Fixes #13766
2019-02-26 08:37:49 -08:00
Alan Agius
ae13974f1d build: update to rxjs 6.4 2019-02-26 08:33:48 -08:00
Rares Matei
f03c44c841 fix(@angular-devkit/build-angular): add promise polyfill to --es5BrowserSupport provided polyfills
Since Angular uses Promises, we need to provide a polyfill for it to support ES5 only browsers.
2019-02-22 15:52:20 -08:00
Hans Larsen
78f5c287d8 refactor(@angular-devkit/build-angular): clean up some interfaces and schemas
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.
2019-02-21 16:20:54 -08:00
Charles Lyding
4751fc02d4 fix(@angular-devkit/build-angular): improve webpack loader resolution
Previously, all loaders either needed to be in the workspace's node modules directory or a node modules directory directly within the build angular package.  A package manager can potentially hoist a loader to a node modules location inbetween the two and causing loader resolution to fail.  This change causes webpack to check all intermediate node modules directories in addition to the initial two locations.
2019-02-19 13:56:35 -08:00
hrocha16
05e2a0eafe fix(@angular-devkit/build-angular): minimum threshold 2019-02-19 13:56:07 -08:00
Hans Larsen
df1b56c251 feat(@angular-devkit/build-angular): move tslint to new API
It is only new files and the old builder is still available. The new
one can only be used by the new Architect API.
2019-02-19 13:51:29 -08:00
Charles Lyding
94b087c9e1 fix(@angular-devkit/build-angular): disable by default stylesheet root relative URL rebasing
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.
2019-02-19 10:14:46 -08:00
Charles Lyding
5016843c39 style(@angular-devkit/build-angular): remove comment reference to eject 2019-02-15 15:09:11 -08:00
Alan
daab547731 docs: remove analyse link from statsJson description
https://webpack.github.io/analyse has been broken for over a year and it seems that it is no longer maintained.

See  https://github.com/webpack/analyse/issues/30

Closes #10589
2019-02-13 15:26:12 -08:00
hrocha16
b611e7fc58 fix(@angular-devkit/build-angular): added warning for ES2017 2019-02-13 15:20:41 -08:00
Charles Lyding
af88936ef5 fix(@angular-devkit/build-angular): remove unneeded script element type 2019-02-13 15:20:15 -08:00
Alan
1efc9d29af fix(@angular-devkit/build-angular): throw error when multiple bundles have been name the same
Naming more than 1 bundle with the same name might cause undefined behavior.

Fixes #13568
2019-02-13 15:19:01 -08:00
Alan
5415bcc6f8 refactor: deprecate protractor baseUrl option from builder
Users should use baseUrl property in the Protractor config file
2019-02-08 16:09:30 -08:00
Alan
8252f20615 fix(@angular-devkit/build-angular): error when both baseUrl and devServerTarget are used in protractor
Users cannot use both baseUrl and devServerTarget, and the later superseeds the baseUrl.

Fixes #13611
2019-02-08 16:09:30 -08:00
Alan
7bc2e396d3 refactor: change error message to use option name instead of args 2019-02-08 16:09:30 -08:00
Filipe Silva
e6f96fb744 fix(@angular-devkit/build-angular): use sourcemap object in karma plugin (#13584)
Followup to https://github.com/angular/angular-cli/pull/13062

Fix https://github.com/angular/angular-cli/issues/13580
2019-02-05 21:15:49 -08:00
Alan Agius
290b68c03a fix(@angular-devkit/build-angular): add missing open parenthesis in stacktrace (#13565)
Fixes #13558
2019-02-05 21:14:54 -08:00
clydin
fa6795a847 Fully resolve correct @ngtools/webpack loader (#13549)
* refactor(@ngtools/webpack): support import-based loader resolution

* fix(@angular-devkit/build-angular): ensure correct ngtools loader version

By using the the direct import approach, the loader will be guaranteed to originate from the same package version/location as the other `@ngtools/webpack` imports.

Fixes #13539
2019-02-05 21:12:31 -08:00
Alan
0c65664f03 fix(@angular-devkit/build-angular): error only when file is not found in non of the programs
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
2019-01-23 10:12:22 -08:00
Filipe Silva
d536df95f2 feat(@angular-devkit/build-angular): update webpack to 4.29
This version (https://github.com/webpack/webpack/releases/tag/v4.29.0) includes a memory leak fix for assets (https://github.com/webpack/webpack/pull/8609, https://github.com/webpack/webpack/pull/8642).

Thanks to @meligy for pinging about this!
2019-01-22 09:39:19 -08:00
Charles Lyding
e3a148a74b feat(@angular-devkit/build-angular): conditional ES2015 polyfill loading 2019-01-15 14:17:55 -08:00
Alan Agius
a38db5dbf2 build: update webpack and postcss
Update `webpack` to `4.28.4` and `postcss` to `7.0.11`
2019-01-14 14:18:32 -08:00
調月奏
b972d57537 fix(@angular-devkit/build-angular): script chunk in angular.json return false then calling isInitial
This commit add the webpack chunk with it related chunkgroup or entrypoint
2019-01-14 12:53:52 -08:00
Alan
d10f125cc1 fix(@angular-devkit/build-angular): vendorSourceMap not being recognized when passed directly
Fixes #13414
2019-01-14 11:08:20 -08:00
Alan
b66e0bbc60 fix(@angular-devkit/build-angular): only show production warning when having either styles on scripts optimization turn on
Fixes #13415
2019-01-14 11:07:49 -08:00
Matthias Gaudin
59d9735193 fix(@angular-devkit/build-angular): add missing declaration types in build_angular schemas.
Fixes issue #13388
2019-01-14 11:06:00 -08:00
Hans Larsen
f9a311a66f fix(@angular-devkit/build-angular): prints a warning on --host on serve
The warning points to a solution for the WDS disconnect issue. Using --disable-host-check
will additionally warn the user that this might be insecure.

Fixes #11060
2019-01-14 11:03:52 -08:00
ManfredSteyer
dcc53d00cc feat(@angular-devkit/build-angular): add factory methods for WebpackBuilder and LoggingFactory 2019-01-08 13:49:10 -08:00
Alan Agius
6db7038c1b feat(@angular-devkit/build-angular): add support for port 0 when using protractor
Fixes #13129
2019-01-08 13:42:45 -08:00
Tiago Temporin
b233e8f59d refactor(@angular-devkit/build-angular): improve check port
Closes 8595
2019-01-08 13:36:55 -08:00
Filipe Silva
3b52fa43d3 fix(@angular-devkit/build-angular): resolve project root for fork process
Fix https://github.com/angular/angular-cli/issues/13113
2018-12-26 12:32:49 -08:00
Amadou Sall
18566b0442 fix(@angular-devkit/build-angular): remove circular dependencies warnings in ngfactory files
Fixes #11135
2018-12-19 10:26:18 -08:00
jonwrede
bc9d6eb3e7 fix(@angular-devkit/build-angular): remove invalid colors option of ProgressPlugin
ProgressPlugin has no option colors https://github.com/webpack/webpack/issues/8487
ng serve fails if progress is shown
2018-12-12 11:13:49 -08:00
Alan Agius
42962571be fix(@angular-devkit/build-angular): output non human readable lint result
At the moment, when the tslint formatted is non human readable, it is being fully silenced.

This changes this behaviour and only emit the formatted result.

Fixes #13173
2018-12-12 11:13:08 -08:00
Pascal Honegger
63a9bd464f docs: remove space for webpack-bundle-analyzer url 2018-12-10 13:41:12 -08:00
cexbrayat
4567aa1de4 style(@angular-devkit/build-angular): typo in stylesSourceMap 2018-12-10 13:39:25 -08:00
Alan Agius
43231d9507 refactor: script webpack plugin remove webpack 3 code 2018-12-06 11:44:55 -08:00
Alan Agius
18ff08dfb3 refactor: remove webpack 3 code from cleancss plugin 2018-12-06 11:44:42 -08:00
Alan Agius
eaad125da9 refactor: normalizeFileReplacements and normalizeAssetPatterns no longer use rxjs 2018-12-06 11:44:27 -08:00
Alan Agius
af67b49342 refactor: clean up how to generate normalized build options and improve type safety 2018-12-06 11:44:27 -08:00
Alan Agius
4f8a5b7a55 feat(@angular-devkit/build-angular): fine grain settings for optimization 2018-12-06 11:44:27 -08:00
Alan Agius
45b6df511f fix(@angular-devkit/build-angular): lint non human readable formatters produces invalid output
fixes #12674
2018-12-06 11:24:27 -08:00
Alan Agius
cd66d27170 refactor: deprecate evalSourceMap (#13063)
Missed a couple in https://github.com/angular/angular-cli/pull/12966
2018-11-30 14:06:55 -08:00
Alan Agius
8516d68213 feat(@angular-devkit/build-angular): fine grain settings for sourceMaps (#13062)
* feat(@angular/cli): update schema to match new `sourceMap`

* feat(@angular-devkit/build-angular): fine grain settings for sourceMaps

This PR add more control over which sourceMaps you want, Now you can enable sourceMaps for scripts only, styles only or both. Also we added another functionality which are hidden sourcemaps. These are normaly used for error reporting tools.

Fixes #7527
2018-11-30 13:11:52 -08:00