This repository was archived by the owner on Aug 7, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 40
Make the webpack dependencies prod dependencies of this plugin #569
Labels
Comments
sis0k0
added a commit
that referenced
this issue
Jun 20, 2018
implements #569 BREAKING CHANGES: The dependencies that were previously added by the nativescript-dev-webpack plugin to the project's package.json are now dependencies of the plugin itself. MIGRATION: 1. Remove all obsolete dependencies from your project. You can do that by invoking the script: ``` ./node_modules/.bin/update-ns-webpack --deps ``` 2. [Angular] Add the following packages as devDependencies: ``` //package.json "devDependencies": { "@angular-devkit/build-angular": "~0.7.0-rc.0", "@angular/compiler-cli": "~6.1.0-beta.1", //... } ```
Released with 0.14.0. |
sis0k0
added a commit
that referenced
this issue
Jul 3, 2018
@angular-devkit/build-angular is not a dependency Revert to adding @ngtools/webpack instead of @angular-devkit/build-angular because the later is ~150mb bigger and slows down the {N} cloud builds. Add @ngtools/webpack to the project dependencies only if @angular-devkit/build-angular isn't there already. That's because the @angular-devkit/build-angular already depends on @ngtools/webpack. This will prevent the plugin from adding multiple instances of @ngtools/webpack to the project which would cause the build to fail. related to #571, #569
This was referenced Jul 3, 2018
sis0k0
added a commit
that referenced
this issue
Jul 3, 2018
@angular-devkit/build-angular is not a dependency Revert to adding @ngtools/webpack instead of @angular-devkit/build-angular because the later is ~150mb bigger and slows down the {N} cloud builds. Add @ngtools/webpack to the project dependencies only if @angular-devkit/build-angular isn't there already. That's because the @angular-devkit/build-angular already depends on @ngtools/webpack. This will prevent the plugin from adding multiple instances of @ngtools/webpack to the project which would cause the build to fail. related to #571, #569 fixes #595
sis0k0
added a commit
that referenced
this issue
Jul 3, 2018
@angular-devkit/build-angular is not a dependency Revert to adding @ngtools/webpack instead of @angular-devkit/build-angular because the later is ~150mb bigger and slows down the {N} cloud builds. Add @ngtools/webpack to the project dependencies only if @angular-devkit/build-angular isn't there already. That's because the @angular-devkit/build-angular already depends on @ngtools/webpack. This will prevent the plugin from adding multiple instances of @ngtools/webpack to the project which would cause the build to fail. related to #571, #569 BREAKING CHANGES Not really a breaking change but: It's a good idea to remove the `@angular-devkit/build-angular` from the package.json and add `@ngtools/webpack` instead as this will speed up the build. fixes #595
sis0k0
added a commit
that referenced
this issue
Jul 4, 2018
…ld-angular is not a dependency (#594) * fix: add @ngtools/webpack to project deps only if @angular-devkit/build-angular is not a dependency Revert to adding @ngtools/webpack instead of @angular-devkit/build-angular because the later is ~150mb bigger and slows down the {N} cloud builds. Add @ngtools/webpack to the project dependencies only if @angular-devkit/build-angular isn't there already. That's because the @angular-devkit/build-angular already depends on @ngtools/webpack. This will prevent the plugin from adding multiple instances of @ngtools/webpack to the project which would cause the build to fail. related to #571, #569 BREAKING CHANGES Not really a breaking change but: It's a good idea to remove the `@angular-devkit/build-angular` from the package.json and add `@ngtools/webpack` instead as this will speed up the build. fixes #595 * test(e2e): update demo Angular deps
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
Issue Checklist
Current behaviour
Currently, when installing the
nativescript-dev-webpack
plugin, some development dependencies are added to thepackage.json
of the project. These dependencies are needed for the webpack build.Problems
./node_modules/.bin/update-ns-webpack --deps
. This is a very annoying thing to do for all {N} apps and plugins in the {N} organisation.package.json
gets huge and it's often hard to recognize which are the webpack dependencies.@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 - https://github.com/angular/angular-cli/blob/master/packages/ngtools/webpack/src/loader.ts#L36-L43.Proposed solution
Solution for 1. and 2. - all dependencies that are currently added to the project's
package.json
, will be dependencies of thenativescript-dev-webpack
plugin. They won't be added to the project'spackage.json
anymore.Solution for 3. - all {N} Angular projects and templates should have a dependency to
@angular-devkit/build-angular
. That way, the {N}-dev-webpack plugin won't have to have a dependency to@ngtools/webpack
, because the above is already brought to the project by@angular-devkit/build-angular
.Tasks breakdown
dependencyManager
dependencies of thenativescript-dev-webpack
plugin.update-ns-webpack
script remove all unneeded dependencies from the project.update-ns-webpack
script update or add if missing the@angular-devkit/build-angular
and@angular/compiler-cli
dependencies.@angular-devkit/build-angular
as dependency to all apps and templates in the {N} organization.@nativescript/schematics
- remove the adding of webpack dependencies there.The text was updated successfully, but these errors were encountered: