2045 Commits

Author SHA1 Message Date
Renovate Bot
398f56d545 build: update all non-major dependencies 2021-06-30 11:45:41 +02:00
Renovate Bot
73a0a04c24 build: update all non-major dependencies 2021-06-29 08:46:19 +02:00
Alan Agius
18cfa04317 feat(@angular-devkit/build-angular): add support to inline Adobe Fonts
With this change we add support to inline external Adobe fonts into the index html, we also add a `preconnect` hint which helps improve page load speed.

Closes #21186
2021-06-28 20:22:29 +02:00
Alan Agius
47a1ccc507 refactor: disable esbuild worker threads
This is a workaround for `TypeError [Error]: Cannot read property 'workerPort' of undefined`.
2021-06-28 17:57:57 +02:00
Renovate Bot
f69e4f3cc9 build: update all non-major dependencies 2021-06-28 17:57:57 +02:00
Alan Agius
9a751f0f81 fix(@angular-devkit/build-angular): handle ENOENT and ENOTDIR errors when deleting outputs
Closes #21202
2021-06-28 17:15:19 +02:00
Charles Lyding
fd4ae0fb16 refactor(@angular-devkit/build-angular): lazy load Webpack in differential loading processor
Webpack is a large dependency with a large dependency graph. By only loading Webpack when needed in the differential loading and i18n processors, initial startup time can be improved and memory usage can be reduced.
2021-06-28 14:42:12 +02:00
Charles Lyding
e49079d971 refactor(@angular-devkit/build-angular): remove jest-worker direct dependency
The worker pool for differential loading and i18n processing is now managed by the `piscina` dependency. This dependency is already used within the recently added JavaScript optimizer refactoring and reduces both the number of direct dependencies and amount of code to setup the worker pools.
2021-06-28 14:42:12 +02:00
Renovate Bot
ada64401d0 build: update all non-major dependencies 2021-06-27 16:02:14 +02:00
Renovate Bot
7d2f09875a build: update dependency style-loader to v3 2021-06-25 10:18:22 +02:00
Renovate Bot
82fbb993b3 build: update dependency esbuild to v0.12.9 2021-06-25 08:45:04 +02:00
Alan Agius
05a52c8c59 refactor: clean up remove unused code 2021-06-25 07:46:22 +02:00
Alan Agius
ebf3fab921 build: update eslint-plugin-import to 2.23.4 2021-06-25 07:46:12 +02:00
Alan Agius
6a9c7ffd97 ci: increase shards for karma tests
This should help to reduce heap out of memory errors during Karma tests.
2021-06-25 07:45:37 +02:00
Charles Lyding
da32daa75d perf(@angular-devkit/build-angular): use combination of esbuild and terser as a JavaScript optimizer
The javascript optimization pipeline is now a two-phase process.  `esbuild` is used in the first phase to remove the majority of the unused code and shorten identifiers in each output bundle script.  `esbuild` can accomplish this in a fraction of the time that `terser` previously required.  However, `esbuild` does not yet implement all of the optimizations that `terser` performs.  As a result, `terser` is used as a second phase to further optimize and reduce the size of the output bundle scripts.  Since `terser` is operating on a smaller input size, the time required for `terser` to complete is significantly reduced.  To further improve performance when source maps are enabled, the source map merging is now performed within the optimization workers. A maximum of four (4) optimization workers are currently used and this value can be adjusted via the `NG_BUILD_MAX_WORKERS` environment variable.
2021-06-25 07:44:57 +02:00
Alan Agius
203e1a4d60 refactor(@angular-devkit/build-angular): remove unused mime-types from style configuration 2021-06-25 07:44:46 +02:00
Renovate Bot
4e8566fa91 build: update dependency core-js to v3.15.1 2021-06-23 11:51:53 +01:00
Alan Agius
4fc33ca0c0 build: update to ng-packagr to 12.1.0-next.0 2021-06-23 11:51:09 +01:00
Renovate Bot
50b18858fc build: update all non-major dependencies 2021-06-22 17:40:09 +01:00
Alan Agius
06181c2fbf fix(@angular-devkit/build-angular): parse web-workers in tests when webWorkerTsConfig is defined
The logic was inverted which caused workers not to be parsed when `webWorkerTsConfig` is defined.
2021-06-22 17:39:12 +01:00
Renovate Bot
4cfb81e75a build: update all non-major dependencies 2021-06-21 11:13:21 +01:00
Charles Lyding
d4c5f8518d fix(@angular-devkit/build-angular): control linker template sourcemapping via builder sourcemap options
This change allows the linker sourcemap behavior to be controlled by the Webpack sourcemap configuration. For example, if a vendor file is being processed and vendor sourcemaps are disabled, the linker will now skip its internal sourcemap loading and processing steps.
2021-06-21 11:12:00 +01:00
Alan Agius
ab17b1721c fix(@angular-devkit/build-angular): handle ng-packagr errors more gracefully.
Ng-packagr will throw an error when a compilation fails.
2021-06-21 11:11:09 +01:00
Renovate Bot
b3c333aafd build: update dependency less-loader to v10 2021-06-18 11:19:47 +01:00
Renovate Bot
8c4c464f5c build: update all non-major dependencies 2021-06-17 09:43:33 -04:00
Alberto Calvo
0fe6cfef64 fix(@angular-devkit/build-angular): use the name as chunk filename instead of id 2021-06-16 08:15:38 -04:00
Renovate Bot
3dbd3e3242 build: update all non-major dependencies 2021-06-16 08:00:05 -04:00
Renovate Bot
ddd2c9f671 build: update all non-major dependencies 2021-06-15 07:30:11 -04:00
Renovate Bot
4409998826 build: update all non-major dependencies 2021-06-14 08:03:27 -04:00
Charles Lyding
b3d7080147 build: enable esModuleInterop TypeScript option
The `esModuleInterop` option is recommended to be enable by TypeScript and corrects several assumptions TypeScript would otherwise make when importing CommonJS files.
This option change helps ensure compatibility as packages move towards ESM.
Reference: https://www.typescriptlang.org/tsconfig#esModuleInterop
2021-06-13 11:45:55 -04:00
Alan Agius
528b7f182e refactor(@angular-devkit/build-angular): extract webpack configurations from browser builder 2021-06-11 17:20:50 -04:00
Alan Agius
f90a8324b4 perf(@angular-devkit/build-angular): enable opt-in usage of file system cache
With this change we enable Webpack's filesystem cache, this important because `terser-webpack-plugin`, `css-minimizer-webpack-plugin` and `copy-webpack-plugin` all use Webpacks' caching API to avoid additional processing during the 2nd cold build.

This changes causes `node_modules` to be treated as immutable. Webpack will avoid hashing and timestamping them, assume the version is unique and will use it as a snapshot.

To opt-in using the experimental persistent build cache use the`NG_PERSISTENT_BUILD_CACHE` environment variable.

```
NG_PERSISTENT_BUILD_CACHE=1 ng serve
```
2021-06-11 12:11:49 -04:00
Alan Agius
83602515fa fix(@angular-devkit/build-angular): explicitly set compilation target in test configuration
When not set, and browserslist returns no reesults due to the file being empty or commented. Webpack will generate invalid code because it doesn't know which enviorment we want to target.

```diff
- (self["webpackChunktest_app"] = self["webpackChunktest_app"] || []).push([["vendor"],{

/***/ 8583:
```

Closes #21111
2021-06-11 09:51:25 -04:00
Alan Agius
071c8d10ce fix(@angular-devkit/build-angular): don't parse new Worker syntax when webWorkerTsConfig is not defined in karma builder
This is to retain version 11 behaviour.

Closes #21108
2021-06-11 09:42:25 -04:00
Alan Agius
cc4afa2de6 refactor(@angular-devkit/build-angular): ignore postcss-loader warning
Users should not install `postcss` in their workspace as this is a dependency of `@angular-devkit/build-angular`.
2021-06-11 09:24:48 -04:00
Renovate Bot
7d57e5ae81 build: update dependency postcss-loader to v6 2021-06-11 09:16:06 -04:00
Renovate Bot
b17937a00d build: update all non-major dependencies 2021-06-11 09:15:12 -04:00
Renovate Bot
8624680036 build: update all non-major dependencies 2021-06-10 18:13:08 +02:00
Charles Lyding
b35ef57b0f feat(@angular-devkit/build-angular): suppport using TypeScript 4.3
With the support of TypeScript 4.3 within the Angular framework, the CLI now supports using TypeScript 4.3 as well.  TypeScript 4.2 also continues to be supported for existing projects.
2021-06-10 17:34:02 +02:00
Alan Agius
1dd3bda57f test: fix failing tests which were not shown
Previously when an unhandled error occured Bazel would mark the suit as passed instead of failed.

See: https://togithub.com/bazelbuild/rules_nodejs/commit/3c4ef58
2021-06-10 16:25:19 +02:00
Alan Agius
dc5a58528a fix(@angular-devkit/build-angular): styles CSS files not available in unit tests
With this change we force styles to be extracted in css files during unit tests.

Closes #21054
2021-06-09 08:00:58 +02:00
Alan Agius
fe1825ae38 test: refactor karma tests to use test harness 2021-06-09 08:00:58 +02:00
Renovate Bot
137bbb7b49 build: update all non-major dependencies 2021-06-08 12:30:32 +02:00
Alan Agius
c43ace7383 fix(@angular-devkit/build-angular): add web-workers in lazy chunks in stats output
Web-workers are not marked as `initial` since their initialization can be guarded.

Closes #21059
2021-06-07 19:29:58 +02:00
Alan Agius
2d0d82ba5b fix(@angular-devkit/build-angular): correctly mark async chunks as non initial in dev-server 2021-06-07 17:09:49 +02:00
Alan Agius
699802d488 perf(@angular-devkit/build-angular): reduce memory usage by cleaning output directory before emitting
Unless `deleteOutputPath` is false, we should clean, this helps reduce assets in tests.
2021-06-07 17:09:27 +02:00
Renovate Bot
c68492797f build: update dependency webpack-merge to v5.8.0 2021-06-07 12:45:36 +02:00
Renovate Bot
9a4b55aa91 build: update all non-major dependencies 2021-06-06 19:07:02 +02:00
Charles Lyding
1168edb8d1 refactor(@angular-devkit/build-angular): add a loose mode for build optimizer enum pass
The `adjust-typescript-enums` plugin now includes an optional loose mode. This mode generates less code for an adjusted enum but differs from the canonical TypeScript enum structure emitted by the TypeScript compiler. This mode is only enabled for packages validated to operate correctly with this structure and is currently limited to first-party Angular packages. The adjusted structure is a variation of the previous build optimizer pass structure but better reflects the runtime behavior of the TypeScript emit structure.
2021-06-04 21:10:06 +02:00
Charles Lyding
5bdd1cbbb7 refactor(@angular-devkit/build-angular): enable babel build optimizer passes for ES2015+ targets
The new babel-based build optimizer passes are now enabled when targetting ES2015 and higher. ES5 targets will currently continue to use the previous build optimizer. ES5 support will require additional refactoring of the downlevelling process as the new build optimizer passes are designed for ES2015 code.
2021-06-04 21:10:06 +02:00