I am trying to setup visual studio code for a nodejs project following https://code.visualstudio.com/docs/languages/javascript
I created a jsconfig.json file in my root folder with the contents
{
"compilerOptions": {
"target": "ES5", //tried ES6 as well
"module": "commonjs"
}
}
This file tells VS Code you are writing ES5 compliant code and the module system you want to use is the commonjs framework. With these options set, you can start to write code that references modules in other files. For example, in app.js we require the ./routes/index module, which exports an Express.Router class. If you bring up IntelliSense on routes, you can see the shape of the Router class.
Although it doesn't seem to work with vscode 0.9.1. I don't get intellisense on my own modules. Go to definition doesn't work either.
https://code.visualstudio.com/docs/runtimes/nodejs#_great-code-editing-experiences
Is there a way to get go to definition working?
var
orfunction
. Doesn't work for global things, doesn't work for anything declared withthis.
. Same for Intellisense I think.