grunt-ts 和 tsc 产生不同的结果
grunt-ts and tsc producing different results
我将 tsconfig.json 文件与 g运行t-ts 结合使用,这里是 g运行t 任务:
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"
]
}
当我尝试 运行 这个 g运行t 任务时,我从重复标识符中收到错误 TS2300。 exclude: "typings/main"
旨在避免这种情况,它在从命令行 运行ning tsc 时有效,但在 运行ning g运行t-ts 任务时无效。有点困惑,因为它肯定在编译中排除了 node_modules
,但不包括类型文件。
When I try to run this grunt task I get an error TS2300 from duplicate identifiers. the exclude: "typings/main" is meant to avoid this, and it works when running tsc from the command line, but not when running the grunt-ts task
已验证错误。您创建的问题:https://github.com/TypeStrong/grunt-ts/issues/334 is actually a duplicate of https://github.com/TypeStrong/grunt-ts/issues/285 和待决
我将 tsconfig.json 文件与 g运行t-ts 结合使用,这里是 g运行t 任务:
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"
]
}
当我尝试 运行 这个 g运行t 任务时,我从重复标识符中收到错误 TS2300。 exclude: "typings/main"
旨在避免这种情况,它在从命令行 运行ning tsc 时有效,但在 运行ning g运行t-ts 任务时无效。有点困惑,因为它肯定在编译中排除了 node_modules
,但不包括类型文件。
When I try to run this grunt task I get an error TS2300 from duplicate identifiers. the exclude: "typings/main" is meant to avoid this, and it works when running tsc from the command line, but not when running the grunt-ts task
已验证错误。您创建的问题:https://github.com/TypeStrong/grunt-ts/issues/334 is actually a duplicate of https://github.com/TypeStrong/grunt-ts/issues/285 和待决