Cloud builds are slower since nativescript-dev-webpack v0.14.0 #595
Description
Issue Checklist
- You are submitting: a bug report.
- You verified that this is a real problem by searching the NativeScript Forum and the other issues in this repo.
- You checked our demo apps and the documentation for sample usage.
Problem
Since the nativescript-dev-webpack
plugin started adding a dependency to @angular-devkit/build-angular
instead of @ngtools/webpack
the cloud builds with NativeScript for Windows went from 10min to 15min. The change was introduced by #571 and is released with v0.14.0.
The installation of @angular-devkit/build-angular
is slow on Windows, because this package has quite a lot of dependencies - 373 packages in total.
Solution
We'll revert the new behavior and go back to adding a dependency to @ngtools/webpack
instead of @angular-devkit/build-angular
.
The nativescript-dev-webpack
plugin shouldn't add @ngtools/webpack
if the project already have a dependency to @angular-devkit/build-angular
. This will fix the third problem, described in #569:
For Angular projects one of the added dependencies is @ngtools/webpack. However, the @angular-devkit/build-angular package has a dependency to @ngtools/webpack. That means that if your project has a dependency to @angular-devkit/build-angular (as the default NG web projects do), this can lead to multiple versions of the @ngtools/webpack plugin in your project. Having multiple versions of that plugin causes the webpack compilation to fail - angular/angular-cli:packages/ngtools/webpack/src/loader.ts@master#L36-L43.
Local environment
- Platform: Windows
- Node version: 9.5.0
- NativeScript CLI version: 4.1.3
Project data
- Platform you are building the app for: Android