863 Commits

Author SHA1 Message Date
Renovate Bot
1e76a6cc6a build: update sass to version 1.24.0 2020-01-02 11:41:33 -08:00
Renovate Bot
f0606b14ac build: update mini-css-extract-plugin to version 0.9.0 2020-01-02 11:40:19 -08:00
Renovate Bot
c1b4272012 build: update terser-webpack-plugin to version 2.3.1 2020-01-02 11:39:50 -08:00
Renovate Bot
ce9cf6e8f8 build: update @angular/animations to version 9.0.0-rc.7 2020-01-02 11:39:38 -08:00
Charles Lyding
032fb147f9 fix(@angular-devkit/build-angular): prevent differential loading double sourcemap search
This can drastically reduce memory usage; especially in cases where bundled code modules contain individual sourcemap comments and vendor sourcemaps are disabled.  Enabling the vendor sourcemap option has the side effect of removing all individual module sourcemap comments and as a result removes the potential for those comments to be found and processed.
2020-01-02 11:27:40 -08:00
Alan Agius
490c24be98 fix(@angular-devkit/build-angular): add sourceMappingURL comment for ES2015 during differential loading
When having differential loading enabled we only add the `sourceMappingURL` comment when optimization is enabled, because we only process these bundles when we enabling optimization.

With this change we now process such bundles even when optimization is disabled and add `sourceMappingURL` when source maps are enabled and not hidden.

Closes #16522
2020-01-02 11:27:27 -08:00
Renovate Bot
c099f03dbb build: update @babel/core to version 7.7.7 2019-12-20 16:31:49 -08:00
Renovate Bot
c6e99ec7b6 build: update core-js to version 3.6.0 2019-12-20 16:31:41 -08:00
Renovate Bot
cbfce34045 build: update webpack-dev-server to version 3.10.1 2019-12-20 16:31:31 -08:00
Renovate Bot
4e31b76876 build: update webpack to version 4.41.4 2019-12-20 16:31:22 -08:00
Renovate Bot
ec3d4da62c build: update style-loader to version 1.0.2 2019-12-18 09:31:06 -08:00
Renovate Bot
b14ec4a24c build: update mini-css-extract-plugin to version 0.8.2 2019-12-18 09:30:56 -08:00
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