How to get rid of the warning .ts file is part of the TypeScript compilation but it's unused

后端 未结 16 1142
天命终不由人
天命终不由人 2020-12-30 18:20

I Just updated angular to latest 9.0.0-next.4. I am not using routing but suddenly after updating I keep seeing this warning. How Do I remove this warning

16条回答
  •  臣服心动
    2020-12-30 18:59

    Updated to Angular 9 today and got warnings. My solution was add this "files" array without the "src" in the path. Just added:

     "files": [
        "main.ts",
        "polyfills.ts"
      ],
    

    My full tsconfig.app.json file is:

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

提交回复
热议问题