Currently, I find myself at a standstill trying to enable code autocompletion for popular libraries like BackboneJS, Angular, and jQuery. Unfortunately, the recommended method provided by the VS Code official documentation is not accessible to me (which involves using package.json).
https://code.visualstudio.com/docs/languages/javascript
Following the instructions precisely, I created a jsconfig.json
file with the following configuration:
{
"typeAcquisition": {
"include": [
"lodash",
"angular",
"jquery",
"underscore"
]
},
"include": [
"content/**/*.js"
],
"exclude": [
"**/node_modules/*",
"node_modules",
"**/tmp/*",
"tmp",
"**/temp/*",
"temp",
"**/bin/*",
"bin",
"**/build/*",
"build"
]
}
Despite this setup, I still cannot access autocompletion for angular or backbone js. Additionally, as the project utilizes AMD module system with require js (
require(['modulename], function(module) {...})
) instead of commonjs modules (require('angular')
or import 'backbone'
), it adds another layer of complexity.
If anyone has any suggestions on how to resolve this issue, please feel free to share!