How to enable Intellisense for Javascript AMD modules in VSCode

According to the documents

IntelliSense through the CommonJS and AMD modules inside your project folders are included by understanding your code.

Does anyone have more info on how to make this work? I tried adding the following to my workspace settings.json file, but not a joy.

"javascript.validate.module": "amd" 

thanks

+6
source share
1 answer

Try setting the parameter "javascript.validate.baseUrl".

// Allows you to configure the base url, which is used to resolve module references ( http://requirejs.org/docs/api.html#config-baseUrl ). These options apply only to projects that use the definition of an asynchronous module ("module": "amd").

 "javascript.validate.baseUrl": "", 
+1
source

Source: https://habr.com/ru/post/987115/


All Articles