The supported versions of Node.js support up to ES2018, the only reason why we don't use ES2017+ is because native `async` and `await` don't work with zone.js
See: https://github.com/angular/angular/issues/31730
With this change, we also ensure that we don't downlevel the server bundle to ES5 which is unnecessary.
Closes: #17794
The current message clearly mentions which dependencies are CommonJS ones, but doesn't point out how to get rid of the warning if nothing can be done. This commit adds a mention of `allowedCommonJsDependencies` in the warning to help developers (as we do for `versionMismatch` for example).
Webpack relies on package managers to do module hoisting and doesn't have any deduping logic since version 4.
However relaying on package manager has a number of short comings, such as when having the same library with the same version laid out in different parts of the node_modules tree.
Example:
```
/node_modules/tslib@2.0.0
/node_modules/library-1/node_modules/tslib@1.0.0
/node_modules/library-2/node_modules/tslib@1.0.0
```
In the above case, in the final bundle we'll end up with 3 versions of tslib instead of 2, even though 2 of the modules are identical.
Webpack has an open issue for this https://github.com/webpack/webpack/issues/5593 (Duplicate modules - NOT solvable by `npm dedupe`)
With this change we add a custom resolve plugin that dedupes modules with the same name and versions that are laid out in different parts of the node_modules tree.
Stopping the workers can be a potentially lengthy process with a multi-stage approach based on the state of the worker. This can cause lengthy blocking of the build. This change allows the shutdown to happen in parallel to the remainder of the build.
These tests check the output of the global stylesheet and require a browserslist to target IE but this also triggers differential loading which is unneeded for the test.