假设我们有以下文件:
/mymodule1/
main.server.ts
main.client.ts
/mymodule2/
main.server.ts
main.client.ts
我们如何只编译所有 *.server.ts 文件而保持 *.client.ts 文件不变?
我在我的 tsconfig.json 中尝试过这样的事情,但它失败了:
tsconfig.json,使用tsc cli时:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"sourceMap": true
},
"files": [
"**/*.server.ts"
]
}
[编辑]
或类似的东西:
tsconfig.json,使用Atom时:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"sourceMap": true
},
"filesGlob": [
"**/*.server.ts" //seams to work, but Atom complains that the other files are not added to the compile context.
],
"exclude": [
"**/*.client.ts", //fails, as well as in files
"typings",
"node_modules"
]
}
是否有filesExcludeGlob?