From 546c708fe7400cb3821d2d581ba51daa517940a9 Mon Sep 17 00:00:00 2001 From: Olivier Combe Date: Thu, 19 Oct 2023 09:54:12 +0200 Subject: [PATCH] fix: only add the polyfill file for apps using angular = 15) { + if (this.angularVersion < 15) { files.push( // starting from Angular 15, the `polyfills` option accept an array of module specifiers. // https://github.com/angular/angular-cli/commit/597bfea1b29cc7b25d1f466eb313cbeeb6dffc98 diff --git a/angular/templates/generators/ng-app/template-files/tsconfig.app.ts b/angular/templates/generators/ng-app/template-files/tsconfig.app.ts index 27b38a2e..3ca5d415 100644 --- a/angular/templates/generators/ng-app/template-files/tsconfig.app.ts +++ b/angular/templates/generators/ng-app/template-files/tsconfig.app.ts @@ -37,8 +37,8 @@ export const tsconfigFile = (angularVersion: number): ComponentFile => { "strictInputAccessModifiers": true }, "files": [ - "./src/main.ts", - "./src/polyfills.ts" + "./src/main.ts"${angularVersion >= 15 ? `` : `, + "./src/polyfills.ts"`} ], "include": [ "./src/**/*.d.ts"