fix(@angular-devkit/build-angular): update the ECMA output warning message to be more actionable

Update the `TypeScript compiler options "target" and "useDefineForClassFields" are set to "ES2022"` warning message to be more actionable.

Closes: #24697
This commit is contained in:
Alan Agius 2023-02-10 16:43:06 +00:00 committed by angular-robot[bot]
parent 77aa04cead
commit c65b026e2f
2 changed files with 4 additions and 2 deletions

View File

@ -218,7 +218,8 @@ export function createCompilerPlugin(
(setupWarnings ??= []).push({
text:
'TypeScript compiler options "target" and "useDefineForClassFields" are set to "ES2022" and ' +
'"false" respectively by the Angular CLI.',
'"false" respectively by the Angular CLI.\n' +
`NOTE: You can set the "target" to "ES2022" in the project's tsconfig to remove this warning.`,
location: { file: pluginOptions.tsconfig },
notes: [
{

View File

@ -35,7 +35,8 @@ export function createIvyPlugin(
wco.logger.warn(
'TypeScript compiler options "target" and "useDefineForClassFields" are set to "ES2022" and ' +
'"false" respectively by the Angular CLI. To control ECMA version and features use the Browerslist configuration. ' +
'For more information, see https://angular.io/guide/build#configuring-browser-compatibility',
'For more information, see https://angular.io/guide/build#configuring-browser-compatibility\n' +
`NOTE: You can set the "target" to "ES2022" in the project's tsconfig to remove this warning.`,
);
}