8

After update to angular 9 i receives Warnings:

\src\main.ngtypecheck.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.
\src\polyfills.ngtypecheck.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

my tsconfig.app.json:

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/app",
    "types": []
  },
  "files": ["main.ts", "polyfills.ts"],
  "exclude": [
    "test.ts",
    "**/*.spec.ts"
  ]
}

How to solve these warnings?

Felix
  • 9,248
  • 10
  • 57
  • 89
jasnoh
  • 81
  • 1
  • 2
  • 6
    strange - I didn't have this warning in Ang 9, but I started getting it after upgrading to Angular 10 – Felix Jun 25 '20 at 05:40

2 Answers2

8

@Felix If you're using @angular-builders/custom-webpack package, warnings are caused due to @ngtools/webpack v9 dependency

GitHub issue has been already opened

1

I got these compiler errors when I had configured @angular-devkit/build-angular 0.803.5 with @angular-* 11.2.13. The errors went away after bumping @angular-devkit/build-angular up to 0.1102.14.

CAK2
  • 1,892
  • 1
  • 15
  • 17