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
(cherry picked from commit c65b026)
  • Loading branch information
alan-agius4 authored and dgp1130 committed Feb 10, 2023
1 parent 0571681 commit 88a3315
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,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
Original file line number Diff line number Diff line change
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 88a3315

Please sign in to comment.