0
使用Asp.Net核心1.0和2.0的打字原稿我試圖在根來連接所有生成JavaScript以單個文件(site.js) 。wwwroot文件的我的目錄結構是:刪除wwwroot的生成的JavaScript,即定義(「wwwroot的/服務/
Site
--wwwroot\
----site.js
--typings\
--tsconfig.json
我看過了的tsconfig.json schema docs我已經與「ROOTDIR」,「MAPROOT」和「ourDir」,而是「sourceRoot」的不同組合發揮。不能完全似乎找出正確的組合使用「OUTDIR」似乎使其忽略每個文件在我的項目,只列舉TSC輸出以下文件:
C:/Users/shawn/AppData/Roaming/npm/node_modules/typescript/lib/lib.d.ts
生成的模塊定義出來像
define("wwwroot/services/MessengerService"
,我想他們出來爲
define("services/MessengerService"
因爲asp.net核心從wwwroot的服務。下面全tsconfig.json:
{
"compileOnSave": true,
"compilerOptions": {
"listFiles": true,
"noImplicitAny": false,
"noEmitOnError": false,
"removeComments": true,
"sourceMap": true,
"pretty": true,
"experimentalDecorators": true,
"declaration": false,
"emitDecoratorMetadata": true,
"moduleResolution": "classic",
"target": "es5",
"module": "amd",
"sourceRoot": "wwwroot",
"rootDir": "./wwwroot",
"mapRoot": "wwwroot",
"outFile": "wwwroot/site.js",
"baseUrl": "wwwroot",
"paths": {
"file-drop": [ "typings/file-drop.d.ts" ]
}
},
"exclude": [
"node_modules",
"wwwroot/ref",
"wwwroot/lib",
"typings"
]
}