繁体   English   中英

VSCode TypeScript problemMatcher `$tsc-watch` 不看

[英]VSCode TypeScript problemMatcher `$tsc-watch` not watching

我试图避免在tsconfig.json配置中使用watch: true

通过 VSCode 的任务,我正在使用基本问题匹配器$tsc-watch ,但它在构建时不会以监视模式启动tsc 我正在添加gulp支持,我看到有gulp-watch ,但我想了解为什么$tsc-watch没有像我认为的那样工作。

我通过查看typescript扩展的taskProvider.js弄清楚了这一点。 为了让tsc-watch运行任务所需的option: "watch"

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "type": "typescript",
            "tsconfig": "tsconfig.json",
            "isBackground": true,
            "problemMatcher": ["$tsc-watch"],
            "option": "watch",
            "presentation": {
                "echo": true,
                "reveal": "silent",
                "focus": false,
                "panel": "shared"
            },
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM