3

How automatically compile react jsx or tsx to js into visual studio code? Is a task runner needed? or just a configuration into jsconfig.json?

What I already tried:

I already tried to create a jsconfig.json with jsx parameter without success. I configured a TS compiler, however it compiles only TS to JS, not JSX to JS.

I'm wondering if there any configuration that makes this conversion without need to configura a run task. , for instance "compile on save" like the Full Visual Studio.

4

1 回答 1

0

您可以添加

[
    {
        "key": "ctrl+s",          
        "command": "workbench.action.tasks.build" 
    }
]

到 keybindings.json

并创建文件tasks.json

{
    "version": "0.1.0",
    "command": "webpack",
    "isShellCommand": true,
    "args": [],
    "showOutput": "always"
}
于 2017-01-26T11:20:07.800 回答