Skip to content

Commit 25fafcc

Browse files
alan-agius4dgp1130
authored andcommitted
feat(@schematics/angular): add migration to remove deprecated server options
1 parent 08062e9 commit 25fafcc

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

packages/schematics/angular/migrations/migration-collection.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"update-angular-config": {
8484
"version": "10.0.0-beta.3",
8585
"factory": "./update-10/update-angular-config",
86-
"description": "Remove deprecated 'evalSourceMap', `profile`, 'skipAppShell' and 'vendorSourceMap' from 'angular.json'."
86+
"description": "Remove various deprecated builders options from 'angular.json'."
8787
}
8888
}
8989
}

packages/schematics/angular/migrations/update-10/update-angular-config.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import { workspaces } from '@angular-devkit/core';
1010
import { Rule } from '@angular-devkit/schematics';
1111
import { updateWorkspace } from '../../utility/workspace';
12-
import { ProjectType } from '../../utility/workspace-models';
12+
import { Builders, ProjectType } from '../../utility/workspace-models';
1313

1414
export default function (): Rule {
1515
return updateWorkspace(workspace => {
@@ -25,13 +25,22 @@ export default function (): Rule {
2525
continue;
2626
}
2727

28+
let extraOptionsToRemove = {};
29+
if (target.builder === Builders.Server) {
30+
extraOptionsToRemove = {
31+
vendorChunk: undefined,
32+
commonChunk: undefined,
33+
};
34+
}
35+
2836
// Check options
2937
if (target.options) {
3038
target.options = {
3139
...updateVendorSourceMap(target.options),
3240
evalSourceMap: undefined,
3341
skipAppShell: undefined,
3442
profile: undefined,
43+
...extraOptionsToRemove,
3544
};
3645
}
3746

@@ -46,6 +55,7 @@ export default function (): Rule {
4655
evalSourceMap: undefined,
4756
skipAppShell: undefined,
4857
profile: undefined,
58+
...extraOptionsToRemove,
4959
};
5060
}
5161
}

0 commit comments

Comments
 (0)