Search code examples
typescriptvisual-studio-codevscode-tasks

How to specify a location for TypeScript in tasks.json?


If you ask for a TypeScript build task in Visual Studio code, you get something like this:

    {
        "type": "typescript",
        "tsconfig": "tsconfig.json",
        "problemMatcher": [
            "$tsc"
        ],
        "group": "build"
    }

This causes it run "tsc" on the command line. How can I change the path of "tsc" so that it runs something like "./node_modules/.bin/tsc".


Solution

  • VS code has number of predefined problem matches included.

    If I understand u correctly, I think what you're looking for is creating your own problem matcher.