mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-18 03:23:57 +08:00
fix(@schematics/angular): keep deployUrl option when migrating to application builder
The `deployUrl` option is now supported with the new build system when using the `application` builder. The migration schematic no longer needs to remove the option if present.
This commit is contained in:
parent
0b03829bce
commit
23cc337aa3
@ -32,11 +32,6 @@ function* updateBuildTarget(
|
||||
buildTarget.builder = Builders.Application;
|
||||
|
||||
for (const [, options] of allTargetOptions(buildTarget, false)) {
|
||||
// Show warnings for using no longer supported options
|
||||
if (usesNoLongerSupportedOptions(options, context, projectName)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (options['index'] === '') {
|
||||
options['index'] = false;
|
||||
}
|
||||
@ -82,7 +77,6 @@ function* updateBuildTarget(
|
||||
}
|
||||
|
||||
// Delete removed options
|
||||
delete options['deployUrl'];
|
||||
delete options['vendorChunk'];
|
||||
delete options['commonChunk'];
|
||||
delete options['resourcesOutputPath'];
|
||||
@ -347,19 +341,3 @@ export default function (): Rule {
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
||||
function usesNoLongerSupportedOptions(
|
||||
{ deployUrl }: Record<string, unknown>,
|
||||
context: SchematicContext,
|
||||
projectName: string,
|
||||
): boolean {
|
||||
let hasUsage = false;
|
||||
if (typeof deployUrl === 'string') {
|
||||
hasUsage = true;
|
||||
context.logger.warn(
|
||||
`Skipping migration for project "${projectName}". "deployUrl" option is not available in the application builder.`,
|
||||
);
|
||||
}
|
||||
|
||||
return hasUsage;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user