繁体   English   中英

grunt-ts和tsc产生不同的结果

[英]grunt-ts and tsc producing different results

我将tsconfig.json文件与grunt-ts结合使用,这是grunt任务:

ts: {
    default: {
    tsconfig: true
  }

和tsconfig.json文件:

{
  "compilerOptions": {
    "target": "es5",
    "module": "system",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "noImplicitAny": false,
    "rootDir": "app",
    "outDir": "dist"
  },
  "exclude": [
    "node_modules",
    "bower_components",
    "typings/main",
    "typings/main.d.ts"
  ]
}

当我尝试运行此任务时,我从重复的标识符中收到错误TS2300。 exclude: "typings/main"旨在避免这种情况,它在从命令行运行tsc时有效,而在运行grunt-ts任务时则无效。 有点困惑,因为它肯定在编译中排除了node_modules ,但没有排除node_modules文件。

当我尝试运行此任务时,我从重复的标识符中收到错误TS2300。 exclude:“ typings / main”旨在避免这种情况,它在从命令行运行tsc时有效,但在运行grunt-ts任务时则无效

已验证的错误。 您创建的问题: https : //github.com/TypeStrong/grunt-ts/issues/334实际上是https://github.com/TypeStrong/grunt-ts/issues/285的副本,并可供抢购🌹

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM