851 Commits

Author SHA1 Message Date
Renovate Bot
f00a9ba2b5 build: update terser to version 4.4.3 2019-12-18 09:30:43 -08:00
Renovate Bot
c43732f8c6 build: update postcss to version 7.0.25 2019-12-18 09:30:32 -08:00
Renovate Bot
3751110a6b build: update webpack to version 4.41.3 2019-12-18 09:30:22 -08:00
Renovate Bot
98dd22f52f build: update caniuse-lite to version 1.0.30001016 2019-12-18 09:30:12 -08:00
Renovate Bot
8475f666e8 build: update semver to version 7.1.1 2019-12-18 09:29:26 -08:00
Renovate Bot
115b98478e build: update rollup to version 1.27.13 2019-12-18 09:29:09 -08:00
Renovate Bot
f15c6d1ba5 build: update find-cache-dir to version 3.2.0 2019-12-18 09:28:48 -08:00
Charles Lyding
a5a8cc53bf fix(@angular-devkit/build-angular): optimize web worker differential loading processing
Closes #16441
2019-12-17 11:17:45 -08:00
Renovate Bot
0f01d74637 build: update copy-webpack-plugin to version 5.1.1 2019-12-12 14:02:44 -08:00
Renovate Bot
7150fd365a build: update @angular/animations to version 9.0.0-rc.6 2019-12-12 10:19:14 -08:00
Renovate Bot
0e5a964d0c build: update core-js to version 3.5.0 2019-12-12 10:18:23 -08:00
Renovate Bot
59db0cccdd build: update rollup to version 1.27.11 2019-12-12 10:18:14 -08:00
Renovate Bot
390b6ab0b8 build: update tree-kill to version 1.2.2 2019-12-12 10:18:03 -08:00
Charles Lyding
0a1743ec2e revert: fix(@angular-devkit/build-angular): sockPath for custom path
This reverts commit 5260bbb9a3d17aefb90bcf1b660e252996cf68df.

Fixes #16410
Fixes #16266
2019-12-12 10:17:30 -08:00
Renovate Bot
123dcd91da build: update core-js to version 3.4.8 2019-12-11 10:52:07 -08:00
Renovate Bot
0003bceecc build: update terser-webpack-plugin to version 2.2.3 2019-12-11 10:51:46 -08:00
Renovate Bot
50d2d7d2d8 build: update rollup to version 1.27.10 2019-12-11 10:51:38 -08:00
Renovate Bot
0f0a57f69e build: update rollup to version 1.27.9 2019-12-09 17:05:23 -08:00
Renovate Bot
05e6e8f1e1 build: update terser-webpack-plugin to version 2.2.2 2019-12-09 17:05:07 -08:00
Renovate Bot
840ff49f13 build: update postcss to version 7.0.24 2019-12-09 17:04:52 -08:00
renovate[bot]
a5198f19c1 Merge pull request #16380 from angular/renovate/babel
build: update @babel/core to version 7.7.5
2019-12-09 17:04:11 -08:00
Renovate Bot
4b741030b0 build: update @angular/animations to version 2019-12-09 17:03:59 -08:00
Doug Parker
982df7e77a fix(@angular-devkit/build-angular): update budgets to check differential builds separately
Fixes #15792.

Previously, budgets would include content for both versions of a differential build. Thus the `initial` budget would count content from the ES5 **and** ES2015 bundles together. This is a very misleading statistic because no user would download both versions. I've updated the budget calculators to take this into account and generate size values for both builds which are then checked independently of each other.

The only calculators I changed are the `InitialCalculator` (for computing `initial` bundle sizes) and `BundleCalculator` (for computing named bundles). Since budgets are handled by Webpack for builds without differential loading, the `initial` bundle will always have those two sizes. The `BundleCalculator` might reference a bundle which does not have differential loading performed (such as a CSS file), so it emits sizes depending on whether or not multiple builds were found for that chunk.

Most of the other calculators don't really need to take differential loading into account. `AnyScriptCalculator` and `AnyCalculator` already apply on a file-by-file basis, so they generate sizes for both build versions already. `AnyComponentStyleCalculator` only applies to CSS which does not have differential builds.

The wierd ones here are `AllCalculator` and `AllScriptCalculator` which reference files with and without differential builds. Conceptually, they should be separated, as a "total" budget specified by an app developer probably wanted it to mean "the total resources a user would have to download", which would only be one differential build at a time. However, I don't see a good way of identifying which assets belong to which differential build. Even if an asset belongs to a chunk with differential builds, we don't know which build takes which assets into account. I decided to leave this for the time being, but it is probably something we should look into separately.

Since budgets take differential loading into account, users might reasonably want to set different budgets for different builds (ie. "initial-es2015 bundle should be capped at 100k, but initial-es5 bundle can go to 150k"). That's more of a feature request, so I also left that out for a future PR.
2019-12-09 15:26:50 -08:00
Doug Parker
6427922415 fix(@angular-devkit/build-angular): remove async files from initial bundle budget.
Refs #15792.

Static files listed in `angular.json` were being accounted in the `initial` bundle budget even when they were deferred asynchronously with `"lazy": true` or `"inject": false`. Webpack belives these files to be `initial`, so this commit corrects that by finding all extra entry points and excluding ones which are explicitly marked by the application developer as asynchronous.

One edge case would be that the main bundle might transitively depend on one of these static files, and thus pull it into the `initial` bundle. However, this is not possible because the files are not present until the end of the build and cannot be depended upon by a Webpack build step. Thus all files listed by the application developer can be safely assumed to truly be loaded asynchronously.
2019-12-09 15:26:50 -08:00
Doug Parker
1792ccaf57 refactor(@angular-devkit/build-angular): move budget computations to be post-build
Refs #15792.

This provides access to all the size information necessary because all build steps have already completed. This commit is roughly a no-op because it simply moves the budget checks (for different builds) to be executed post-build.

The lone exception is the AnyComponentStyle budget. Component stylesheet files are not emitted after the build is completed, so there is no size information to work with. Instead, these budgets are checked during a separate plugin (exected for different builds **and** non-differential builds).
2019-12-09 15:26:50 -08:00
Smartin
c73e28e91c refactor(@angular-devkit/build-angular): export executeExtractI18nBuilder
export executeExtractI18nBuilder for use in custom builders and to be consistent with browser- and dev-server-builder.

no breaking changes, no issue
2019-12-09 13:42:08 -08:00
Charles Lyding
f4bb020b94 fix(@angular-devkit/build-angular): ensure source locale data is injected when localizing
Fixes #16389
2019-12-09 13:40:50 -08:00
Alan Agius
f1985e1315 fix(@angular-devkit/build-angular): resolve @babel/preset-env
This is needed as otherwise under Bazel we hit `Cannot find module '@babel/preset-env` we use `require.resolve` since this is always patched under Bazel.
2019-12-09 13:39:35 -08:00
Alan Agius
41c63ea871 fix(@angular-devkit/build-angular): add symlinks option to resolveLoader
This is needed as otherwise under Bazel it will fail with `Angular Compiler was detected but it was an instance of the wrong class.` when not using the linker since node_modules will be linked to `external/npm`. Under Bazel `preserveSymlinks` is to be set to true, however with the current behaviour this doesn't effect resolveLoader.
2019-12-09 13:39:35 -08:00
Charles Lyding
713f95d678 fix(@angular-devkit/build-angular): localize service worker base href 2019-12-09 13:39:06 -08:00
Alan Agius
cae943d7e6 fix(@angular-devkit/build-angular): add notice when using bundleDependencies: none with Ivy
Related to: https://github.com/angular/universal/issues/1354
2019-12-09 13:38:34 -08:00
Renovate Bot
6fa9c2f5af build: update browserslist to version 4.8.2 2019-12-05 18:56:05 -08:00
Doug Parker
59c9802d26 fix(@angular-devkit/build-angular): suppress duplicate 3rdpartylicenses.txt warning
Refs #16193

This detects and filters out error messages about duplicate 3rdpartylicenses.txt. This is a short-term fix intended to get us to 9.0.x release while a follow up effort will work to properly fix this bug. Left a TODO to remove this filter once a fix is ready.
2019-12-05 18:55:15 -08:00
Alan Agius
302a9f325c refactor(@angular-devkit/build-angular): don't add a SourceMapDevToolPlugin when sourcemaps are disabled 2019-12-05 18:53:08 -08:00
Alan Agius
0659cf09e3 fix(@angular-devkit/build-angular): add externalDependencies to server builders
Certain node packages depend on native bindings which cannot be bundled, with this fix we add a way to exclude these from being processed by the bundler.

Closes: #16348
2019-12-05 18:53:08 -08:00
Alan Agius
0a7ace3595 fix(@angular-devkit/build-angular): allow bundleDependencies to be a boolean 2019-12-05 18:53:08 -08:00
Alan Agius
4f19e36dc9 refactor: deprecated unused server builder options 2019-12-05 18:52:27 -08:00
Renovate Bot
d71eea1aed build: update @angular/animations to version 9.0.0-rc.5 2019-12-05 18:51:22 -08:00
Renovate Bot
8270c8539a build: update caniuse-lite to version 1.0.30001015 2019-12-04 08:23:25 -08:00
Charles Lyding
c37eaeec43 fix(@angular-devkit/build-angular): augment base HREF when localizing
All locale i18n options now support an object form which allows a base HREF to be defined for the locale.  Each locale can now optionally define a custom base HREF that will be combined with the base HREF defined for the build configuration.  By default if the shorthand form for the locale is used or the field is not present in the longhand form, the locale code will be used as the base HREF.  To disable automatic augmentation a base HREF value of an empty string (`""`) can be used.  This will prevent anything from being added to the existing base HREF.

For common scenarios, the shorthand form will result in the preferred and recommended outcome of each built locale variant of the application containing a defined base HREF  containing the locale code.
2019-12-04 08:14:16 -08:00
Renovate Bot
3df09bcd8f build: update core-js to version 3.4.7 2019-12-03 12:35:23 -08:00
Renovate Bot
9bec2d9aee build: update autoprefixer to version 9.7.3 2019-12-02 12:51:10 -08:00
Filipe Silva
3079b06bd0 test: re-enable ivy aot rebuild test 2019-12-02 12:50:14 -08:00
Filipe Silva
8f35cdddc8 build: use material 9.0.0-rc.4 2019-12-02 12:50:14 -08:00
Charles Lyding
1d79b28c17 fix(@angular-devkit/build-angular): support differential loading for web workers
Fixes #16275
2019-12-02 10:19:38 -08:00
Charles Lyding
09a7d87f00 fix(@angular-devkit/build-angular): ensure HTML lang attribute is set when localizing 2019-12-02 10:17:57 -08:00
Alan Agius
d155c7c804 fix(@angular-devkit/build-webpack): allow runWebpackDevServer to accept a webpackDevServerFactory 2019-12-02 10:16:08 -08:00
Alan Agius
2960a71807 fix(@angular-devkit/build-angular): pass webpack factor to runWebpackDevServer 2019-12-02 10:16:08 -08:00
Renovate Bot
0ea43cc5a1 build: update @angular/animations to version 9.0.0-rc.4 2019-12-02 10:15:15 -08:00
Renovate Bot
cb8f72a934 build: update style-loader to version 1.0.1 2019-12-02 10:13:45 -08:00