Skip to content

Commit 88a3315

Browse files
alan-agius4dgp1130
authored andcommittedFeb 10, 2023
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 (cherry picked from commit c65b026)
1 parent 0571681 commit 88a3315

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎packages/angular_devkit/build_angular/src/builders/browser-esbuild/compiler-plugin.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ export function createCompilerPlugin(
220220
(setupWarnings ??= []).push({
221221
text:
222222
'TypeScript compiler options "target" and "useDefineForClassFields" are set to "ES2022" and ' +
223-
'"false" respectively by the Angular CLI.',
223+
'"false" respectively by the Angular CLI.\n' +
224+
`NOTE: You can set the "target" to "ES2022" in the project's tsconfig to remove this warning.`,
224225
location: { file: pluginOptions.tsconfig },
225226
notes: [
226227
{

‎packages/angular_devkit/build_angular/src/webpack/plugins/typescript.ts

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

0 commit comments

Comments
 (0)
Please sign in to comment.