How to import repo with uncompiled TypeScript in Angular 5+ (and exclude .spec.ts files)

前端 未结 1 484
走了就别回头了
走了就别回头了 2021-01-11 15:52

A recent upgrade to Angular 5.x is not allowing uncompiled TypeScript to import from a node_modules repo. It looks like the workaround is to include the .

相关标签:
1条回答
  • 2021-01-11 16:06

    open your tsconfig.json, and change to this

    {
      ...
      "compilerOptions": {
       ...
      },      
      "include": [
        "./src",
        "node_modules/example"
      ],
      "exclude" : ...
    }
    
    0 讨论(0)
提交回复
热议问题