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

后端 未结 16 1155
天命终不由人
天命终不由人 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:58

    Are you using @angular-builders/custom-webpack?

    I was getting bombarded with these messages in Angular 10 having never seen them before. Changing includes made no difference.

    Then I found https://github.com/angular/angular/pull/36211.

    This is essentially the same error as raised in this question but for ngtypecheck.ts files (whatever they are exactly i'm not sure!)

    WARNING in /home/circleci/ng/aio/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.

    It looks like for me it's actually to do with @angular-builders/custom-webpack.

    https://github.com/just-jeb/angular-builders/issues/781 where an issue was only just opened. Thanks to https://stackoverflow.com/a/62573294/16940 for pointing this out.

    Updating to the v10.0.1 fixed it for me, but see the above issue for the latest.

    "@angular-builders/custom-webpack": "10.0.1"    // as of today
    

提交回复
热议问题