我有这样一个tsconfig
{
  "compileOnSave": false,
  "compilerOptions": {
    "module": "es2015",
    "target": "es2015",
    "sourceMap": true,
    "jsx": "react",
    "allowSyntheticDefaultImports": true,
    "noImplicitAny": false,
    "watch": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "allowJs": true,
    "suppressOutputPathCheck": true
  },
  "exclude": [
    "dist",
    "node_modules",
    "bower_components",
    "typings/globals",
    "typings/modules"
  ]
}我用webpack来捆绑我的项目文件。大多数定义文件都是使用类型添加的,但是某些npm模块包含自己的定义文件。我希望能够将这些添加到打字本汇编中。否则我会遇到像Cannot find module X这样的错误
如何将这些定义文件包括在编译中?
发布于 2016-06-02 01:25:27
某些npm模块包括它们自己的定义文件。
如果您将exclude设置为commonjs,这些将被拾取(尽管有commonjs)
https://stackoverflow.com/questions/37580726
复制相似问题