Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): update the ECMA output warning me…
Browse files Browse the repository at this point in the history
…ssage to be more actionable

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

Closes: #24697
  • Loading branch information
alan-agius4 authored and angular-robot[bot] committed Feb 10, 2023
1 parent 77aa04c commit c65b026
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Expand Up @@ -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: [
{
Expand Down
Expand Up @@ -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.`,
);
}

Expand Down

0 comments on commit c65b026

Please sign in to comment.