Bad*_*ake 5 typescript visual-studio-code
这是我的打字稿项目的配置文件:
{
"compilerOptions": {
"sourceMap": true,
"target": "es5",
"outFile": "js/app.js"
},
"files": [
"src/main.ts",
"src/bootstrap.ts",
"libs/phaser.d.ts"
],
"exclude": [
"docs",
"css",
"index.html"
]
}
Run Code Online (Sandbox Code Playgroud)
VS Code给了我这个错误:
file:'file:///e%3A/Programming/TypeScript/tsconfig.json'严重性:'错误'消息:'在配置文件中找不到输入'e:/Programming/TypeScript/tsconfig.json'.指定的'include'路径为'["**/*"]','exclude'路径为'["node_modules","bower_components","jspm_packages"]'.' at:'1,1'来源:'js'
我搜索了tsconfig文件的定义,但我找不到此错误的来源.我在这做错了什么?用tsc编译时,一切都很好.
我遇到了类似的错误(由 VS Code 引发),我的解决方案是向文件添加.ts扩展名,作为我的应用程序的入口点。Typescript 只需要编译一些东西(“输入”)。
也许通过添加来指定包含路径
"include": [
'**/*'
]
Run Code Online (Sandbox Code Playgroud)
你的 tsconfig.json 会处理它吗?
| 归档时间: |
|
| 查看次数: |
3765 次 |
| 最近记录: |