Skip to content

Commit 546c708

Browse files
committed
fix: only add the polyfill file for apps using angular <v15
1 parent 59dae2c commit 546c708

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

angular/templates/generators/ng-app/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class NgAppTemplate implements ComponentTemplate {
4242
gitKeepFile(),
4343
];
4444

45-
if (this.angularVersion >= 15) {
45+
if (this.angularVersion < 15) {
4646
files.push(
4747
// starting from Angular 15, the `polyfills` option accept an array of module specifiers.
4848
// https://github.com/angular/angular-cli/commit/597bfea1b29cc7b25d1f466eb313cbeeb6dffc98

angular/templates/generators/ng-app/template-files/tsconfig.app.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ export const tsconfigFile = (angularVersion: number): ComponentFile => {
3737
"strictInputAccessModifiers": true
3838
},
3939
"files": [
40-
"./src/main.ts",
41-
"./src/polyfills.ts"
40+
"./src/main.ts"${angularVersion >= 15 ? `` : `,
41+
"./src/polyfills.ts"`}
4242
],
4343
"include": [
4444
"./src/**/*.d.ts"

0 commit comments

Comments
 (0)