visual-studio-code - 如何跳过放置在工作区文件夹上方目录中的多根 vscode 中的文件?
问题描述
我有一个多根工作区,并且有一个根的启动配置。我已skipFiles
启用忽略所有.ts
文件,但构建步骤看起来是将文件放置在项目的根目录中,而不是任何一个根目录中。因此,如何引用工作区根目录以便跳过这些文件?我不能跳过的文件之一是这个(磁盘上不存在):
myproject/src/types/observableobject.ts
我所有的实际文件都存在于:
myproject/
myproject-frontend/
src/
myproject-backend/
src/
# myproject.code-workspace
{
"folders": [
{
"path": "myproject-backend"
},
{
"path": "myproject-frontend"
}
],
"settings": {
"prettier.tabWidth": 4,
"prettier.packageManager": "yarn"
}
}
# myproject/myproject-frontend/.vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Chrome",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000",
"smartStep": true,
"webRoot": "${workspaceFolder}/src",
"sourceMapPathOverrides": {
"webpack:///src/*": "${webRoot}/*"
},
"skipFiles": [
"<node_internals>/**/*.js",
"${workspaceFolder}/**/node_modules/*",
"${workspaceFolder}/**/*.ts"
]
}
]
}
解决方案
我通过只做一个与磁盘根相关的全局模式而不是workspaceFolder
:
“/**/*.ts”
推荐阅读
- ios - 导航返回时出现 Swift ios 错误
- sage-erp - 设置 Sage 200C
- scala - FS2:是否可以优雅地完成队列?
- javascript - javascript将对象添加到数组
- hive - Hive - 连接两个表以查找与引用表中的字符串类似的字符串
- c++ - 指向非指针编译错误的唯一指针
- node.js - 在本地运行现有的 Angular 项目
- java - java.io.IOException: Cannot run program "svn": CreateProcess error=2, 系统找不到指定的文件
- html - 删除引导顶部边距
- laravel - 我无法上传文件