本文介绍了Angular 9 ngtypecheck的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新到角度9后,我收到警告:

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.

我的tsconfig.app.json:

my tsconfig.app.json:

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

如何解决这些警告?

推荐答案

@Felix如果使用@ angular-builders/custom-webpack软件包,则由于@ ngtools/webpack v9依赖性而引起警告

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

GitHub问题已经解决

这篇关于Angular 9 ngtypecheck的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 03:08