File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
packages/schematics/angular Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import { latestVersions } from '../../utility/latest-versions';
12
12
export function updateDependencies ( ) {
13
13
return ( host : Tree ) => {
14
14
const dependenciesToUpdate : Record < string , string > = {
15
- '@angular/pwa' : latestVersions . AngularPWA ,
15
+ '@angular/pwa' : '^0.803.9' ,
16
16
'@angular-devkit/build-angular' : latestVersions . DevkitBuildAngular ,
17
17
'@angular-devkit/build-ng-packagr' : latestVersions . DevkitBuildNgPackagr ,
18
18
'@angular-devkit/build-webpack' : latestVersions . DevkitBuildWebpack ,
Original file line number Diff line number Diff line change 6
6
* found in the LICENSE file at https://angular.io/license
7
7
*/
8
8
import { Rule } from '@angular-devkit/schematics' ;
9
- import { addPackageJsonDependency , getPackageJsonDependency } from '../../utility/dependencies' ;
9
+ import {
10
+ addPackageJsonDependency ,
11
+ getPackageJsonDependency ,
12
+ removePackageJsonDependency ,
13
+ } from '../../utility/dependencies' ;
10
14
import { latestVersions } from '../../utility/latest-versions' ;
11
15
12
16
export function updateDependencies ( ) : Rule {
13
17
return host => {
14
18
const dependenciesToUpdate : Record < string , string > = {
15
- '@angular/pwa' : latestVersions . AngularPWA ,
16
19
'@angular-devkit/build-angular' : latestVersions . DevkitBuildAngular ,
17
20
'@angular-devkit/build-ng-packagr' : latestVersions . DevkitBuildNgPackagr ,
18
21
'@angular-devkit/build-webpack' : latestVersions . DevkitBuildWebpack ,
@@ -35,5 +38,8 @@ export function updateDependencies(): Rule {
35
38
overwrite : true ,
36
39
} ) ;
37
40
}
41
+
42
+ // `@angular/pwa` package is only needed when running `ng-add`.
43
+ removePackageJsonDependency ( host , '@angular/pwa' ) ;
38
44
} ;
39
45
}
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ export const latestVersions = {
18
18
DevkitBuildAngular : '~0.900.0-next.9' ,
19
19
DevkitBuildNgPackagr : '~0.900.0-next.9' ,
20
20
DevkitBuildWebpack : '~0.900.0-next.9' ,
21
- AngularPWA : '~0.900.0-next.9' ,
22
21
23
22
ngPackagr : '^5.5.1' ,
24
23
} ;
You can’t perform that action at this time.
0 commit comments