fix(angular): prevent false positive validation due to option default value in dev-server executor (#22606)

This commit is contained in:
Leosvel Pérez Espinosa 2024-04-02 11:32:36 +02:00 committed by GitHub
parent 120cde6d52
commit 2aed31fc0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,7 +7,7 @@ export function validateOptions(options: Schema): void {
const { major: angularMajorVersion, version: angularVersion } = const { major: angularMajorVersion, version: angularVersion } =
getInstalledAngularVersionInfo(); getInstalledAngularVersionInfo();
if (lt(angularVersion, '16.1.0') && options.forceEsbuild !== undefined) { if (lt(angularVersion, '16.1.0') && options.forceEsbuild) {
throw new Error(stripIndents`The "forceEsbuild" option is only supported in Angular >= 16.1.0. You are currently using "${angularVersion}". throw new Error(stripIndents`The "forceEsbuild" option is only supported in Angular >= 16.1.0. You are currently using "${angularVersion}".
You can resolve this error by removing the "forceEsbuild" option or by migrating to Angular 16.1.0.`); You can resolve this error by removing the "forceEsbuild" option or by migrating to Angular 16.1.0.`);
} }