Extracted from microsoft/vscode#3509.
According to #6807 the default for module type is commonjs. However, in this example without a jsconfig.json then there are no completion proposals:
- no
jsconfig.json
- add a file bar.js:
- add app.js add the following:
var bar = require('./bar');
bar.
There a no completions on bar.
The work around is to add a jsconfig.json that defines the module type to commonjs:
jsconfig.json
{
"compilerOptions": {
"module": "commonjs"
}
}