Skip to content

Commit

Permalink
fix: only add the polyfill file for apps using angular <v15
Browse files Browse the repository at this point in the history
  • Loading branch information
ocombe committed Oct 19, 2023
1 parent 59dae2c commit 546c708
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion angular/templates/generators/ng-app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class NgAppTemplate implements ComponentTemplate {
gitKeepFile(),
];

if (this.angularVersion >= 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 546c708

Please sign in to comment.