Angular 9 ngtypecheck

jas*_*noh 7 angular angular9

更新到 angular 9 后,我收到警告:

\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.
Run Code Online (Sandbox Code Playgroud)

我的 tsconfig.app.json:

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/app",
    "types": []
  },
  "files": ["main.ts", "polyfills.ts"],
  "exclude": [
    "test.ts",
    "**/*.spec.ts"
  ]
}
Run Code Online (Sandbox Code Playgroud)

如何解决这些警告?

mat*_*ddx 8

@Felix 如果您使用的是@angular-builders/custom-webpack 包,则会由于@ngtools/webpack v9 依赖项而导致警告

GitHub issue 已经打开