Skip to content

Commit fc60d22

Browse files
alan-agius4clydin
authored andcommitted
fix(@angular-devkit/build-angular): correctly set overridden compiler option
Previously, we set the options of an incorrect variable.
1 parent 1225ce4 commit fc60d22

File tree

1 file changed

+2
-2
lines changed
  • packages/angular_devkit/build_angular/src/webpack/plugins

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ export function createIvyPlugin(
2626
};
2727

2828
if (tsConfig.options.target === undefined || tsConfig.options.target < ScriptTarget.ES2022) {
29-
tsConfig.options.target = ScriptTarget.ES2022;
29+
compilerOptions.target = ScriptTarget.ES2022;
3030
// If 'useDefineForClassFields' is already defined in the users project leave the value as is.
3131
// Otherwise fallback to false due to https://github.com/microsoft/TypeScript/issues/45995
3232
// which breaks the deprecated `@Effects` NGRX decorator and potentially other existing code as well.
33-
tsConfig.options.useDefineForClassFields ??= false;
33+
compilerOptions.useDefineForClassFields ??= false;
3434

3535
wco.logger.warn(
3636
'TypeScript compiler options "target" and "useDefineForClassFields" are set to "ES2022" and ' +

0 commit comments

Comments
 (0)