2437 Commits

Author SHA1 Message Date
Alan Agius
f815e08000 refactor(@angular-devkit/build-angular): deprecate showCircularDependencies 2021-03-16 16:42:45 +01:00
Alan Agius
871480a6aa test(@angular-devkit/build-angular): change showCircularDependencies tests to use new test harness 2021-03-16 16:42:45 +01:00
Alan Agius
00ff390fea perf(@angular-devkit/build-angular): disable showCircularDependencies by default
Change the default of this flag to disabled by default as this is a caused of rebuild performance degradation for large projects.

BREAKING CHANGE

The server and browser builder `showCircularDependencies` option default value has been changed from `true` to `false`.
2021-03-16 16:42:45 +01:00
Alan Agius
6cc8c26083 refactor(@ngtools/webpack): remove suppressZoneJsIncompatibilityWarning option
BREAKING CHANGE

`suppressZoneJsIncompatibilityWarning` option has been removed. If you are using this plugin directly and `async/await` in ES2017 make sure you downlevel the async syntax using Babel.

See: https://github.com/angular/zone.js/pull/1140 for more information.
2021-03-15 20:31:25 +01:00
Alan Agius
0420f1a0d7 refactor(@angular-devkit/build-angular): remove differential loading with targets ES2016+ warning 2021-03-15 20:31:25 +01:00
Alan Agius
74537a11d4 test(@angular-devkit/build-angular): update tests to reflect the change in ES targets 2021-03-15 20:31:25 +01:00
Charles Lyding
6fd4da2ebf refactor(@angular-devkit/build-angular): use Webpack builder result provided output path
By using the output path provided directly by the Webpack builder's result, one additional reason for using the expensive `Stats.toJson` call is removed.
This change also removes multiple linting disable rule comments now that the output path property is guaranteed to be present.
2021-03-15 17:45:11 +01:00
Charles Lyding
ff32ada86b feat(@angular-devkit/build-webpack): provide output path in builder results
This change adds the output path for the Webpack build directly to the result of the builder. This removes one of the reasons for using the Webpack JSON stats object which is expensive to generate.
2021-03-15 17:45:11 +01:00
Alan Agius
2d6e82fa10 perf(@angular-devkit/build-angular): enforce Babel not to load sourcemaps from file
Workaround for https://github.com/babel/babel-loader/pull/896
2021-03-15 14:53:49 +01:00
Alan Agius
217a02b879 refactor(@angular-devkit/build-angular): clean up linker detection code 2021-03-15 14:47:13 +01:00
Charles Lyding
699b641b85 perf(@angular-devkit/build-angular): remove Webpack Stats.toJson usage in karma plugin
Webpack's `Stats.toJson` function is an expensive operation and is recommended to be avoided where possible. In the case of the karma plugin, the compilation errors can be accessed directly without the need for the function call.
2021-03-15 09:01:50 +01:00
Charles Lyding
3affd28f5e perf(@angular-devkit/build-angular): remove Webpack Stats.toJson usage in analytics plugin
Webpack's Stats.toJson function is an expensive operation and is recommended to be avoided where possible. In the case of the analytics plugin, the chunks and assets can be accessed directly from the Webpack compilation.
2021-03-15 09:01:36 +01:00
Alan Agius
63a2dbb8b4 perf(@angular-devkit/build-angular): skip FESM2015 from async transformation
Skip  `async` transformation when the path matches a FESM2015 entrypoint.  Ng-packagr doesn't allow changing the script target for entry-points which makes this possible https://github.com/ng-packagr/ng-packagr/blob/master/src/lib/ng-package/entry-point/compile-ngc.transform.ts#L48

This is important to reduce greatly the cold build performance overhead when targeting ES2017+
2021-03-12 16:51:51 +01:00
Alan Agius
9714aa92bf fix(@angular-devkit/build-angular): don't load an input sourcemap from file when using Babel
This ensures that vendor sourcemaps are not loaded from file when they have not been previously loaded via sourcemap-loader.

When vendor sourcemap is enabled, `inputSourceMap` is not needed, since the sourcemap is already available and the `sourceMappingURL` comment is removed from source.
2021-03-12 09:12:16 +01:00
Alan Agius
075c988dd1 fix(@angular-devkit/build-angular): display correct filename for bundles that are ES2016+ 2021-03-12 08:26:04 +01:00
Alan Agius
1e9881bcb4 refactor(@angular-devkit/build-angular): replace lazy loading resources context path 2021-03-10 12:44:04 -06:00
Alan Agius
988b05a8e5 refactor(@angular/cli): remove deprecated lazyModules option from schema 2021-03-10 12:44:04 -06:00
Alan Agius
8d66912323 refactor(@angular-devkit/build-angular): remove deprecated lazyModules option
BREAKING CHANGE:

Server and Browser builder `lazyModules` option has been removed without replacement.
2021-03-10 12:44:04 -06:00
Renovate Bot
2cdad38be3 build: update postcss to version 8.2.8 2021-03-10 08:20:16 -06:00
Charles Lyding
b98d969a92 refactor(@angular-devkit/build-angular): remove speed-measure-plugin usage
The plugin was only used when the `NG_BUILD_PROFILING` environment variable was used.  The environment variable also enabled the Webpack builtin `ProfilingPlugin` which is retained.
The builtin plugin provides a chrome events JSON output which can be loaded in Chrome DevTools and allows for graphical timeline views of the build.
The `speed-measure-plugin` is also currently incompatible with Webpack 5 which would prevent the CLI profiling support from working with Webpack 5.
2021-03-10 08:19:56 -06:00
Alan Agius
71eab3ddb6 feat(@angular-devkit/build-angular): show warning during build when project requires IE 11 support
Internet Explorer 11 support is deprecated and will be removed in future versions of the Angular CLI.
2021-03-10 08:18:49 -06:00
Charles Lyding
a09000cbe6 test(@angular-devkit/build-angular): remove unneeded nobazel_patch_module_resolver option
As of rules_nodejs 3.0.0, the `bazel_patch_module_resolver` option defaults to off.
2021-03-10 08:17:31 -06:00
Charles Lyding
a51eb6e864 test(@angular-devkit/build-angular): add dev-server execute and fetch unit test helper
This change extracts common test code into a helper function to reduce complexity of the dev-server builder unit tests.
2021-03-10 08:17:10 -06:00
Charles Lyding
06a354fb93 test(@angular-devkit/build-angular): add dev-server builder allowedHosts option tests
This change adds expanded unit tests for the dev-server builder's `allowedHosts` option using the builder test harness.
2021-03-10 08:17:10 -06:00
Charles Lyding
037a1b8e9e test(@angular-devkit/build-angular): add dev-server builder build inline critical CSS behavior tests
This change adds expanded unit tests for the dev-server builder's build inline critical CSS behavior using the builder test harness.
2021-03-10 08:17:10 -06:00
Charles Lyding
a24c212203 test(@angular-devkit/build-angular): add dev-server builder build budget behavior tests
This change adds expanded unit tests for the dev-server builder's build budget behavior using the builder test harness.
2021-03-10 08:17:10 -06:00
Charles Lyding
420f4f2655 test(@angular-devkit/build-angular): add dev-server builder verbose option tests
This change adds expanded unit tests for the dev-server builder's `verbose` option using the builder test harness.
2021-03-10 08:17:10 -06:00
Charles Lyding
c9bdfc74ab test(@angular-devkit/build-angular): add dev-server builder watch option tests
This change adds expanded unit tests for the dev-server builder's `watch` option using the builder test harness.
2021-03-10 08:17:10 -06:00
Renovate Bot
bcbd13fe58 build: update postcss to version 8.2.7 2021-03-08 08:50:19 -06:00
Renovate Bot
db90891782 build: update license-webpack-plugin to version 2.3.15 2021-03-08 08:49:43 -06:00
Alan Agius
84f39778cc fix(@angular-devkit/build-angular): only remove nomodule and defer attributes empty values
Closes #20207
2021-03-08 08:47:55 -06:00
Charles Lyding
240727aefa refactor(@angular-devkit/build-angular): separate global script configuration logic
This change moves the global script resolution logic to a separate function to aid in reducing the complexity of the Webpack styles configuration partial generation function.
2021-03-08 08:46:20 -06:00
Charles Lyding
1b5798dba3 refactor(@angular-devkit/build-angular): use nested Webpack rules to define style processing
By using Webpack's nested rule and `oneOf` rule support, a large amount of conditional logic and array processing can be removed from the Webpack style configuration generator function.
2021-03-08 08:46:20 -06:00
Alan Agius
8e981d0880 feat(@angular-devkit/core): add handling for defaultConfiguration target definition property 2021-03-08 08:45:54 -06:00
Alan Agius
1da359ac08 feat(@angular-devkit/architect): add implementation for defaultConfiguration
With this change, the architect can be configured to use a default configuration when it's not provided as part of the target.

Consider the below, where `defaultConfiguration` is configured to `production`. Running `ng build` will be invoked with "production" configuration.

```js
"build": {
  "builder": "@angular-devkit/build-angular:browser",
  "defaultConfiguration": "production",
  "options": {
      ...
  },
  "configurations": {
    "production": {
        ...
    }
  }
}
```
2021-03-08 08:45:54 -06:00
Charles Lyding
c2b7260f79 refactor(@angular-devkit/core): deprecate unused utility functions
The `clean` and `mapObject` utility functions are unused by the Angular CLI.
2021-03-03 09:18:40 -05:00
Renovate Bot
9b100253e4 build: update open to version 8.0.2 2021-03-03 07:03:19 -05:00
Charles Lyding
d3ea61f7fe build: remove unused development dependencies
Several dependencies were no longer used within the project but still present in the `package.json`
2021-03-03 07:02:51 -05:00
Charles Lyding
e1b3ee6f58 refactor(@angular-devkit/build-angular): use custom babel loader for i18n dev-server support
The custom babel loader allows files to be conditionally processed by the i18n inlining transforms based on both file path and content.
By allowing content based checks, the entire parse/transform/print process can be skipped for files that do not contain localizations.
2021-03-02 14:07:09 -05:00
Renovate Bot
d23e6cad20 build: update open to version 8.0.1 2021-03-02 12:17:14 -05:00
Charles Lyding
237715f9ce test(@angular-devkit/build-angular): improve reliability of app-shell server-worker test
The test now waits until the express server is listening and uses a try/finally block to ensure the server is shutdown.
The test server also only now binds to localhost and lets the OS choose a port. This provides better support for running multiple tests in parallel.
2021-03-02 09:18:59 -05:00
Renovate Bot
d3d2cc7372 build: update babel packages 2021-03-02 06:20:27 -05:00
Charles Lyding
3408c3df49 refactor(@angular-devkit/build-angular): only inline component stylesheet sourcemaps
This change also ensures that hidden sourcemaps will be propagated through the loader chain and are extracted for global stylesheets.
2021-03-02 06:13:19 -05:00
Renovate Bot
598190ec73 build: update inquirer to version 8.0.0 2021-03-01 10:40:04 -05:00
Renovate Bot
2ab413fda8 build: update core-js to version 3.9.1 2021-03-01 09:45:49 -05:00
Alan Agius
6a7d1e0be4 fix(@angular-devkit/build-angular): remove left-over experimentalRollupPass option 2021-03-01 09:45:21 -05:00
Alan Agius
11b1d9c2d1 fix(@angular-devkit/build-angular): inline critical font-face rules when using crittical css inlining
When critical font rules are not inlined it will cause blinking as during first render the fallback font will be rendered.

Related to https://github.com/angular/universal/issues/2002
2021-02-26 16:01:42 -05:00
Alan Agius
aa3ea885ed feat(@angular-devkit/build-angular): enable inlineCritical by default
BREAKING CHANGE:

Critical CSS inlining is now enabled by default. If you wish to turn this off set `inlineCritical` to `false`.

See: https://angular.io/guide/workspace-config#optimization-configuration
2021-02-26 13:22:58 -05:00
Renovate Bot
cb32006bce build: update mini-css-extract-plugin to version 1.3.9 2021-02-26 09:07:57 -05:00
Renovate Bot
02db14ae95 build: update rxjs to version 6.6.6 2021-02-25 13:59:51 -05:00