0

I updated from Angular 7 to Angular 9 and now getting a bunch of errors similar to this one.

WARNING in C:\Users\DEV-SYS\Documents\GitHub\Angular-7\src\environments\environment.prod.ts is part of the TypeScript compilation but it's unused. Add only entry points to the 'files' or 'include' properties in your tsconfig.

One way to get rid of them would be to delete the file but since i might need the one or other later, how can i tell the system not to try to compile ? I tried adding the below to my tsconfig.app.json with not much luck.

  "exclude": [
        "test.ts",
        "**/*.spec.ts",
        "environment.prod.ts"
    ]

What am i missing here ?

NoSoup4you
  • 640
  • 1
  • 10
  • 34
  • See https://stackoverflow.com/questions/57729518/how-to-get-rid-of-the-warning-ts-file-is-part-of-the-typescript-compilation-but – Kishan May 18 '20 at 18:51

1 Answers1

-1

As your environment.prod.ts is inside nested folders, you will have to give something like this.

 "exclude": [
        "test.ts",
        "**/*.spec.ts",
        "./src/environments/environment.prod.ts"
    ]

The path you have give form excluding environment.prod.ts file is wrong.

Arun s
  • 869
  • 9
  • 19